# Xoron Cryptographic Library

## Introduction

The crypto library is used to implement the security algorithm of xoron cryptography.

## Library Definition

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
#ifndef XORON_CRYPTO_H
#define XORON_CRYPTO_H
```

## Includes

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <time.h>
#include <pthread.h>

#include "xrn_common.h"
#include "xrn_encoder.h"
#include "xrn_core.h"
#include "xrn_steg.h"
#include "xrn_arithmetic.h"
```

## Internal Definitions

The **XRN_MAX_RING_SIG_SIZE** define is used to define the maxmum size of a ring signature.

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
#define XRN_MAX_RING_SIG_SIZE 255
```

The **XRN_MIN_RING_SIG_SIZE** define is used to define the minimum size of a ring signature.

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
#define XRN_MIN_RING_SIG_SIZE 3
```

The **XRN_STATE_KEY_SIZE** defines the size of monovalent polyvalent datastructures.

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
// NBITS*6
#define XRN_STATE_KEY_SIZE 1536
```

## Type Definitions

### xbinomial_key_t

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
typedef struct xbinomial_key_t {
    xnum_t  start;
    xnum_t  end;
} xbinomial_key_t;  
```

The **start** field is the start point.

The **end** field is the end point.

### xmonomial_key_t

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
typedef struct xmonomial_key_t {
    xnum_t  distance;
} xmonomial_key_t;  
```

The **distance** field is the distance between two points.

### xstart_point_t

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
typedef struct xstart_point_t {
    xnum_t  start;
} xstart_point_t;  
```

The **start** field is the start of the pseudo random sequence.

### xmonovalent_key_t

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
typedef struct xmonovalent_key_t {
    uint64_t start_timestamp;
    uint64_t end_timestamp;
    xnum_t  state[XRN_STATE_KEY_SIZE];
} xmonovalent_key_t;  
```

The **start_timestamp** field is used to define the start of validity.

The **end_timestamp** field is used to define the end of validity.

The **state** field is the derived key.

### xpolyvalent_key_t

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
typedef struct xpolyvalent_key_t {
    xnum_t  state[XRN_STATE_KEY_SIZE];
} xpolyvalent_key_t;  
```

The **state** field is the derived key.

### xpolyvalent_proof_t

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
typedef struct xpolyvalent_proof_t {
    xnum_t  state[XRN_STATE_KEY_SIZE];
} xpolyvalent_proof_t;  
```

The **state** field is the derived key.

### xhash_t

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
typedef struct xhash_t {
    xnum_t  value;
} xhash_t;  
```

The **value** field is the hash number.

### xsignature_asy_t

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
typedef struct xsignature_asy_t {
    xnum_t  hint;
    xnum_t  proof;
} xsignature_asy_t;  
```

The **hint** field is the result of a random computation, which need to be used to check the signature validity.

The **proof** field is the number compared to verify if the validity of the signature.

### xsignature_sym_t

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
typedef struct xsignature_sym_t {
    xnum_t  hint;
    xnum_t  proof;
} xsignature_sym_t;  
```

The **hint** field is the result of a random computation, which need to be used to check the signature validity.

The **proof** field is the number compared to verify if the validity of the signature.

### xring_signature_t

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
typedef struct xring_signature_t {
    xnum_t  hint;
    xnum_t  proof;
    uint8_t ring_size;
    xbinomial_key_t binomial_keys[XRN_MAX_RING_SIG_SIZE];
} xring_signature_t;  
```

The **hint** field is the result of a random computation, which need to be used to check the signature validity.

The **proof** field is the number compared to verify if the validity of the signature.

The **ring_size** field is the number of binomial keys in the signature.

The **binomial_keys** field is the list of binomial keys.

### xcertificate_asy_t

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
typedef struct xcertificate_asy_t {
    char subject [XRN_SUBJECT_CERTIFICATE_LENGTH];
    xbinomial_key_t binomial_key;
    uint64_t start_timestamp;
    uint64_t end_timestamp;
    xsignature_asy_t signature;
} xcertificate_asy_t;  
```

The **subject** field is a string containing a name for the owner of the binomial_key.

The **binomial_key** field is the binomial key of the subject.

The **start_timestamp** field is the start of the validity for the certificate.

The **end_timestamp** field is the end of the validity for the certificate.

The **signature** field is the signature of the issuer of the certificate.


### xcertificate_sym_t

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
typedef struct xcertificate_sym_t {
    char subject [XRN_SUBJECT_CERTIFICATE_LENGTH];
    xmonovalent_key_t monovalent_key;
    uint64_t start_timestamp;
    uint64_t end_timestamp;
    xsignature_sym_t signature;
} xcertificate_sym_t;  
```

The **subject** field is a string containing a name for the owner of the binomial_key.

The **binomial_key** field is the binomial key of the subject.

The **start_timestamp** field is the start of the validity for the certificate.

The **end_timestamp** field is the end of the validity for the certificate.

The **signature** field is the signature of the issuer of the certificate.

### xbinomial_commitment_t

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
typedef struct xbinomial_commitment_t {
    xnum_t  start;
    xnum_t  end;
} xbinomial_commitment_t;  
```

The **start** field is the start point.

The **end** field is the end point.

### xmonomial_commitment_t

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
typedef struct xmonomial_commitment_t {
    xnum_t  distance;
} xmonomial_commitment_t;  
```

The **distance** field is the distance between two points.


### xmonomial_response_t

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
typedef struct xmonomial_response_t {
    xnum_t  distance;
} xmonomial_response_t;  
```

The **distance** field is the distance between two points.

### xmonomial_proof_t

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
typedef struct xmonomial_proof_t {
    xnum_t  distance;
} xmonomial_proof_t;  
```

The **distance** field is the distance between two points.

### xblock_settings_t

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
typedef struct xblock_settings_t {
   XBIT_TYPE all;
   uint64_t start_block;
   uint64_t end_block;
} xblock_settings_t;  
```

The **all_file** field is used to indicate if all the file should be used in the operation.

The **start_block** field is used to indicate what is the starting block to be used in the operation.

The **end_block** field is used to indicate what is the ending block to be used in the operation.


## Extra Includes

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
#include "xrn_crypto_backend.h"
```

## Load Functions

### xrn_load_monovalent_key

**Description:**

The **xrn_load_monovalent_key** function is used to parse a file and store the content in the xmonovalent_key_t data structure.
The function implements data integrity check.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_load_monovalent_key ( 
    xmonovalent_key_t * mkey,
    FILE * fpr,
    xrn_crypto_extra_settings_t *settings
);
```

**Arguments description:**

> **output:** mkey $\rightarrow$ The monovalent key pointer. \
> **input:** fpr $\rightarrow$ The source file pointer. \
> **inout:** settings $\rightarrow$The run time settings pointer. 

[comment]: <> ( docautocomplete xrn_load_monovalent_key )


### xrn_load_polyvalent_key

**Description:**

The **xrn_load_polyvalent_key** function is used to parse a file and store the content in the xpolyvalent_key_t data structure.
The function implements data integrity check.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_load_polyvalent_key ( 
    xpolyvalent_key_t * pstate,
    FILE * fpr,
    xrn_crypto_extra_settings_t *settings
);
```

**Arguments description:**

> **output:** pstate $\rightarrow$ The polyvalent state key pointer. \
> **input:** fpr $\rightarrow$ The source file pointer. \
> **inout:** settings $\rightarrow$The run time settings pointer. 

[comment]: <> ( docautocomplete xrn_load_polyvalent_key )



### xrn_load_binomial_key

**Description:**

The **xrn_load_binomial_key** function is used to parse a file and store the content in the xbinomial_key_t data structure.
The function implements data integrity check.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_load_binomial_key ( 
    xbinomial_key_t * bkey,
    FILE * fpr,
    xrn_crypto_extra_settings_t * settings
);
```

**Arguments description:**

> **output:** bkey $\rightarrow$ The binomial key pointer. \
> **input:** fpr $\rightarrow$ The source file pointer. \
> **inout:** settings $\rightarrow$The run time settings pointer. 

[comment]: <> ( docautocomplete xrn_load_binomial_key )


### xrn_load_monomial_key

**Description:**

The **xrn_load_monomial_key** function is used to parse a file and store the content in the xmonomial_key_t data structure.
The function implements data integrity check.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_load_monomial_key ( 
    xmonomial_key_t * mkey,
    FILE * fpr,
    xrn_crypto_extra_settings_t * settings
);
```

**Arguments description:**

> **output:** mkey $\rightarrow$ The monomial key pointer. \
> **input:** fpr $\rightarrow$ The source file pointer. \
> **inout:** settings $\rightarrow$The run time settings pointer. 

[comment]: <> ( docautocomplete xrn_load_monomial_key )



### xrn_load_certificate_asy

**Description:**

The **xrn_load_certificate_asy** function is used to parse a file and store the content in the xcertificate_asy_t data structure.
The function implements data integrity check.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_load_certificate_asy ( 
    xcertificate_asy_t * cert,
    FILE * fpr,
    xrn_crypto_extra_settings_t * settings
);
```

**Arguments description:**

> **output:** cert $\rightarrow$ The asymmetric certificate pointer. \
> **input:** fpr $\rightarrow$ The source file pointer. \
> **inout:** settings $\rightarrow$The run time settings pointer. 

[comment]: <> ( docautocomplete xrn_load_certificate_asy )



### xrn_load_certificate_sym

**Description:**

The **xrn_load_certificate_sym** function is used to parse a file and store the content in the xcertificate_sym_t data structure.
The function implements data integrity check.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_load_certificate_sym ( 
    xcertificate_sym_t * cert,
    FILE * fpr,
    xrn_crypto_extra_settings_t * settings
);
```

**Arguments description:**

> **output:** cert $\rightarrow$ The symmetric certificate pointer. \
> **input:** fpr $\rightarrow$ The source file pointer. \
> **inout:** settings $\rightarrow$The run time settings pointer. 

[comment]: <> ( docautocomplete xrn_load_certificate_sym )


### xrn_load_signature_sym

**Description:**

The **xrn_load_signature_sym** function is used to parse a file and store the content in the xsignature_sym_t data structure.
The function implements data integrity check.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_load_signature_sym ( 
    xsignature_sym_t * sig,
    FILE * fpr,
    xrn_crypto_extra_settings_t * settings 
);
```

**Arguments description:**

> **output:** sig $\rightarrow$ The symmetric signature pointer. \
> **input:** fpr $\rightarrow$ The source file pointer. \
> **inout:** settings $\rightarrow$The run time settings pointer. 

[comment]: <> ( docautocomplete xrn_load_signature_sym )


### xrn_load_signature_asy

**Description:**

The **xrn_load_signature_asy** function is used to parse a file and store the content in the xsignature_asy_t data structure.
The function implements data integrity check.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_load_signature_asy ( 
    xsignature_asy_t * sig,
    FILE * fpr,
    xrn_crypto_extra_settings_t * settings
);
```

**Arguments description:**

> **output:** sig $\rightarrow$ The asymmetric signature pointer. \
> **input:** fpr $\rightarrow$ The source file pointer. \
> **inout:** settings $\rightarrow$The run time settings pointer. 

[comment]: <> ( docautocomplete xrn_load_signature_asy )



### xrn_load_ring_signature

**Description:**

The **xrn_load_ring_signature** function is used to parse a file and store the content in the xring_signature_t data structure.
The function implements data integrity check.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_load_ring_signature ( 
    xring_signature_t * sig,
    FILE * fpr,
    xrn_crypto_extra_settings_t * settings 
);
```

**Arguments description:**

> **output:** sig $\rightarrow$ The ring signature pointer. \
> **input:** fpr $\rightarrow$ The source file pointer. \
> **inout:** settings $\rightarrow$The run time settings pointer. 

[comment]: <> ( docautocomplete xrn_load_ring_signature )



### load_xhash

**Description:**

The **load_xhash** function is used to parse a file and store the content in the xhash_t data structure.
The function implements data integrity check.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_load_hash ( 
    xhash_t * hash,
    FILE * fpr,
    xrn_crypto_extra_settings_t * settings
);
```

**Arguments description:**

> **output:** hash $\rightarrow$ The hash pointer. \
> **input:** fpr $\rightarrow$ The source file pointer. \
> **inout:** settings $\rightarrow$The run time settings pointer. 

[comment]: <> ( docautocomplete xrn_load_hash )



### xrn_load_polyvalent_proof

**Description:**

The **xrn_load_polyvalent_proof** function is used to parse a file and store the content in the xpolyvalent_proof_t data structure.
The function implements data integrity check.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_load_polyvalent_proof ( 
    xpolyvalent_proof_t * polyvalent_proof,
    FILE * fpr,
    xrn_crypto_extra_settings_t * settings
);
```

**Arguments description:**

> **output:** polyvalent_proof $\rightarrow$The polyvalent proof state pointer. \
> **input:** fpr $\rightarrow$ The source file pointer. \
> **inout:** settings $\rightarrow$ The run time settings. 

[comment]: <> ( docautocomplete xrn_load_polyvalent_proof )



### load_xstart_point

**Description:**

The **load_xstart_point** function is used to parse a file and store the content in the xstart_point_t data structure.
The function implements data integrity check.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_load_start_point ( 
    xstart_point_t * start_point,
    FILE * fpr,
    xrn_crypto_extra_settings_t * settings
);
```

**Arguments description:**

> **output:** start_point $\rightarrow$The start point pointer. \
> **input:** fpr $\rightarrow$ The source file pointer. \
> **inout:** settings $\rightarrow$ The run time settings. 

[comment]: <> ( docautocomplete xrn_load_start_point )




### xrn_load_binomial_commitment

**Description:**

The **xrn_load_binomial_commitment** function is used to parse a file and store the content in the xbinomial_commitment_t data structure.
The function implements data integrity check.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_load_binomial_commitment ( 
    xbinomial_commitment_t * commitment,
    FILE * fpr,
    xrn_crypto_extra_settings_t * settings
);
```

**Arguments description:**

> **output:** commitment $\rightarrow$ The commitment pointer. \
> **input:** fpr $\rightarrow$ The source file pointer. \
> **inout:** settings $\rightarrow$ The run time settings. 

[comment]: <> ( docautocomplete xrn_load_binomial_commitment )


### xrn_load_monomial_commitment

**Description:**

The **xrn_load_monomial_commitment** function is used to parse a file and store the content in the xmonomial_commitment_t data structure.
The function implements data integrity check.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_load_monomial_commitment ( 
    xmonomial_commitment_t * commitment,
    FILE * fpr,
    xrn_crypto_extra_settings_t * settings
);
```

**Arguments description:**

> **output:** commitment $\rightarrow$ The commitment pointer. \
> **input:** fpr $\rightarrow$ The source file pointer. \
> **inout:** settings $\rightarrow$ The run time settings. 

[comment]: <> ( docautocomplete xrn_load_monomial_commitment )


### xrn_load_monomial_response

**Description:**

The **xrn_load_monomial_response** function is used to parse a file and store the content in the xmonomial_response_t data structure.
The function implements data integrity check.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_load_monomial_response ( 
    xmonomial_response_t * response,
    FILE * fpr,
    xrn_crypto_extra_settings_t * settings
);
```

**Arguments description:**

> **output:** response $\rightarrow$ The response pointer. \
> **input:** fpr $\rightarrow$ The source file pointer. \
> **inout:** settings $\rightarrow$ The run time settings. 

[comment]: <> ( docautocomplete xrn_load_monomial_response )


### xrn_load_monomial_proof

**Description:**

The **xrn_load_monomial_proof** function is used to parse a file and store the content in the xmonomial_proof_t data structure.
The function implements data integrity check.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_load_monomial_proof ( 
    xmonomial_proof_t * proof,
    FILE * fpr,
    xrn_crypto_extra_settings_t * settings
);
```

**Arguments description:**

> **output:** proof $\rightarrow$ The proof pointer. \
> **input:** fpr $\rightarrow$ The source file pointer. \
> **inout:** settings $\rightarrow$ The run time settings. 

[comment]: <> ( docautocomplete xrn_load_monomial_proof )


## Dump Functions

### xrn_dump_monovalent_key

**Description:**

The **xrn_dump_monovalent_key** function is used to write the xmonovalent_key_t data structure into a file.
The function implements data integrity check.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_dump_monovalent_key ( 
    xmonovalent_key_t mkey,
    FILE * fpw,
    xrn_crypto_extra_settings_t settings
); 
```

**Arguments description:**

> **input:** mkey $\rightarrow$ The monovalent key. \
> **output:** fpw $\rightarrow$ The destination file pointer. \
> **inout:** settings $\rightarrow$ The run time settings. 

[comment]: <> ( docautocomplete xrn_dump_monovalent_key )



### xrn_dump_polyvalent_key

**Description:**

The **xrn_dump_polyvalent_key** function is used to write the xpolyvalent_key_t data structure into a file.
The function implements data integrity check.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_dump_polyvalent_key ( 
    xpolyvalent_key_t pstate,
    FILE * fpw,
    xrn_crypto_extra_settings_t settings
); 
```

**Arguments description:**

> **input:** pstate $\rightarrow$ The polyvalent state. \
> **output:** fpw $\rightarrow$ The destination file pointer. \
> **inout:** settings $\rightarrow$ The run time settings. 

[comment]: <> ( docautocomplete xrn_dump_polyvalent_key )




### xrn_dump_binomial_key

**Description:**

The **xrn_dump_binomial_key** function is used to write the xbinomial_key_t data structure into a file.
The function implements data integrity check.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_dump_binomial_key ( 
    xbinomial_key_t bkey,
    FILE * fpw,
    xrn_crypto_extra_settings_t settings
); 
```

**Arguments description:**

> **input:** bkey $\rightarrow$ The binomial key. \
> **output:** fpw $\rightarrow$ The destination file pointer. \
> **inout:** settings $\rightarrow$ The run time settings. 

[comment]: <> ( docautocomplete xrn_dump_binomial_key )



### xrn_dump_monomial_key

**Description:**

The **xrn_dump_monomial_key** function is used to write the xmonomial_key_t data structure into a file.
The function implements data integrity check.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_dump_monomial_key ( 
    xmonomial_key_t mkey,
    FILE * fpw,
    xrn_crypto_extra_settings_t settings
); 
```

**Arguments description:**

> **input:** mkey $\rightarrow$ The monomial key. \
> **output:** fpw $\rightarrow$ The destination file pointer. \
> **inout:** settings $\rightarrow$ The run time settings. 

[comment]: <> ( docautocomplete xrn_dump_monomial_key )



### xrn_dump_signature_asy

**Description:**

The **xrn_dump_signature_asy** function is used to write the xsignature_asy_t data structure into a file.
The function implements data integrity check.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_dump_signature_asy ( 
    xsignature_asy_t sig,
    FILE * fpw,
    xrn_crypto_extra_settings_t settings 
);
```

**Arguments description:**

> **input:** sig $\rightarrow$ The asymmetric signature. \
> **output:** fpw $\rightarrow$ The destination file pointer. \
> **inout:** settings $\rightarrow$ The run time settings. 

[comment]: <> ( docautocomplete xrn_dump_signature_asy )



### xrn_dump_signature_sym

**Description:**

The **xrn_dump_signature_sym** function is used to write the xsignature_sym_t data structure into a file.
The function implements data integrity check.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_dump_signature_sym ( 
    xsignature_sym_t sig,
    FILE * fpw,
    xrn_crypto_extra_settings_t settings 
);
```

**Arguments description:**

> **input:** sig $\rightarrow$ The symmetric signature. \
> **output:** fpw $\rightarrow$ The destination file pointer. \
> **inout:** settings $\rightarrow$ The run time settings. 

[comment]: <> ( docautocomplete xrn_dump_signature_sym )



### xrn_dump_ring_signature

**Description:**

The **xrn_dump_ring_signature** function is used to write the xring_signature_t data structure into a file.
The function implements data integrity check.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_dump_ring_signature ( 
    xring_signature_t sig,
    XBIT_TYPE shuffle,
    FILE * fpw,
    xrn_crypto_extra_settings_t settings 
);
```

**Arguments description:**

> **input:** sig $\rightarrow$ The ring signature. \
> **input:** shuffle $\rightarrow$ Change the order of the binomial keys in the signature. \
> **output:** fpw $\rightarrow$ The destination file pointer. \
> **inout:** settings $\rightarrow$ The run time settings. 

[comment]: <> ( docautocomplete xrn_dump_ring_signature )



### xrn_dump_polyvalent_proof

**Description:**

The **dump_xpolyvelant_proof** function is used to write the xpolyvelant_proof_t data structure into a file.
The function implements data integrity check.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_dump_polyvalent_proof ( 
    xpolyvalent_proof_t polyvalent_proof, 
    FILE * fpw,
    xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **input:** polyvalent_proof $\rightarrow$ The polyvalant proof. \
> **output:** fpw $\rightarrow$ The destination file pointer. \
> **inout:** settings $\rightarrow$ The run time settings. 

[comment]: <> ( docautocomplete xrn_dump_polyvalent_proof )




### dump_xstart_point

**Description:**

The **dump_xstart_point** function is used to write the xstart_point_t data structure into a file.
The function implements data integrity check.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_dump_start_point ( 
    xstart_point_t start_point, 
    FILE * fpw,
    xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **input:** start_point $\rightarrow$ The start point value. \
> **output:** fpw $\rightarrow$ The destination file pointer. \
> **inout:** settings $\rightarrow$ The run time settings. 

[comment]: <> ( docautocomplete xrn_dump_start_point )



### dump_xhash

**Description:**

The **dump_xhash** function is used to write the xhash_t data structure into a file.
The function implements data integrity check.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_dump_hash ( 
    xhash_t hash, 
    FILE * fpw,
    xrn_crypto_extra_settings_t settings 
);
```

**Arguments description:**

> **input:** hash $\rightarrow$ The hash value. \
> **output:** fpw $\rightarrow$ The destination file pointer. \
> **inout:** settings $\rightarrow$ The run time settings. 

[comment]: <> ( docautocomplete xrn_dump_hash )



### xrn_dump_certificate_asy

**Description:**

The **xrn_dump_certificate_asy** function is used to write the xcertificate_asy_t data structure into a file.
The function implements data integrity check.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_dump_certificate_asy ( 
    xcertificate_asy_t cert,
    FILE * fpw,
    xrn_crypto_extra_settings_t settings 
);
```

**Arguments description:**

> **input:** cert $\rightarrow$ The asymmetric certificate value. \
> **output:** fpw $\rightarrow$ The destination file pointer. \
> **inout:** settings $\rightarrow$ The run time settings. 

[comment]: <> ( docautocomplete xrn_dump_certificate_asy )



### xrn_dump_certificate_sym

**Description:**

The **xrn_dump_certificate_sym** function is used to write the xcertificate_sym_t data structure into a file.
The function implements data integrity check.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_dump_certificate_sym ( 
    xcertificate_sym_t cert,
    FILE * fpw,
    xrn_crypto_extra_settings_t settings 
);
```

**Arguments description:**

> **input:** cert $\rightarrow$ The symmetric certificate value. \
> **output:** fpw $\rightarrow$ The destination file pointer. \
> **inout:** settings $\rightarrow$ The run time settings. 

[comment]: <> ( docautocomplete xrn_dump_certificate_sym )


### xrn_dump_binomial_commitment

**Description:**

The **xrn_dump_binomial_commitment** function is used to write a file given a xbinomial_commitment_t data structure.
The function implements data integrity check.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_dump_binomial_commitment ( 
    xbinomial_commitment_t commitment,
    FILE * fpr,
    xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **input:** commitment $\rightarrow$ The binomial commitment. \
> **output:** fpr $\rightarrow$ The source file pointer. \
> **inout:** settings $\rightarrow$ The run time settings. 

[comment]: <> ( docautocomplete xrn_dump_binomial_commitment )


### xrn_dump_monomial_commitment

**Description:**

The **xrn_load_monomial_commitment** function is used to write a file given a xmonomial_commitment_t data structure.
The function implements data integrity check.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_dump_monomial_commitment ( 
    xmonomial_commitment_t commitment,
    FILE * fpr,
    xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **input:** commitment $\rightarrow$ The commitment pointer. \
> **output:** fpr $\rightarrow$ The source file pointer. \
> **inout:** settings $\rightarrow$ The run time settings. 

[comment]: <> ( docautocomplete xrn_dump_monomial_commitment )


### xrn_dump_monomial_response

**Description:**

The **xrn_dump_monomial_response** function is used to write a file given a xmonomial_response_t data structure.
The function implements data integrity check.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_dump_monomial_response ( 
    xmonomial_response_t response,
    FILE * fpr,
    xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **output:** response $\rightarrow$ The response pointer. \
> **input:** fpr $\rightarrow$ The source file pointer. \
> **inout:** settings $\rightarrow$ The run time settings. 

[comment]: <> ( docautocomplete xrn_dump_monomial_response )


### xrn_dump_monomial_proof

**Description:**

The **xrn_dump_monomial_proof** function is used to write a file given a xmonomial_proof_t data structure.
The function implements data integrity check.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_dump_monomial_proof ( 
    xmonomial_proof_t proof,
    FILE * fpr,
    xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **output:** proof $\rightarrow$ The proof pointer. \
> **input:** fpr $\rightarrow$ The source file pointer. \
> **inout:** settings $\rightarrow$ The run time settings. 

[comment]: <> ( docautocomplete xrn_dump_monomial_proof )


## Make Functions

### xrn_make_monovalent_key

**Description:**

The **xrn_make_monovalent_key** function is used to generate a binomial state key.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_make_monovalent_key ( 
    xrn_matrix_t * xrn_matrix,
    uint64_t start_timestamp,
    uint64_t end_timestamp,
    xpolyvalent_key_t * polyvalent_key,
    xpolyvalent_proof_t * polyvalent_proof,
    xmonovalent_key_t * monovalent_key,
    xrn_crypto_extra_settings_t settings 
); 
```

**Arguments description:**

> **input:** xrn_matrix $\rightarrow$ The xoron matrix pointer. \
> **input:** start_timestamp $\rightarrow$ The start of validity. \
> **input:** end_timestamp $\rightarrow$ The end of validity. \
> **output:** polyvalent_key $\rightarrow$ The polyvalent key. \
> **output:** polyvalent_proof $\rightarrow$The polyvalent_proof. \
> **output:** monovalent_key $\rightarrow$ The binomial state pointer. \
> **inout:** settings $\rightarrow$ The run time settings. 

[comment]: <> ( docautocomplete xrn_make_monovalent_key )



### xrn_make_monovalent_key_wrapper

**Description:**

The **xrn_make_monovalent_key_wrapper** function is used to generate a file storing a binomial state key.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_make_monovalent_key_wrapper ( 
    FILE * xrn_matrix_fpr,
    uint64_t start_timestamp,
    uint64_t end_timestamp,
    FILE * polyvalent_key_fpw,
    FILE * polyvalent_proof_fpw,
    FILE * monovalent_key_fpw,
    xrn_crypto_extra_settings_t settings 
); 
```

**Arguments description:**

> **input:** xrn_matrix_fpr $\rightarrow$ The xoron matrix file pointer. \
> **input:** start_timestamp $\rightarrow$ The start of validity. \
> **input:** end_timestamp $\rightarrow$ The end of validity. \
> **output:** polyvalent_key_fpw $\rightarrow$ The polyvalent key file pointer. \
> **output:** polyvalent_proof_fpw $\rightarrow$The polyvalent proof file pointer. \
> **output:** monovalent_key_fpw $\rightarrow$ The binomial keys file pointer. \
> **inout:** settings $\rightarrow$ The run time settings. 

[comment]: <> ( docautocomplete xrn_make_monovalent_key_wrapper )



### xrn_make_binomial_key

**Description:**

The **xrn_make_binomial_key** function is used to generate a binomial key.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_make_binomial_key ( 
    xrn_matrix_t * xrn_matrix,
    xstart_point_t sp,
    xmonomial_key_t mkey,
    xbinomial_key_t * bkey,
    xrn_crypto_extra_settings_t settings
); 
```

**Arguments description:**

> **input:** xrn_matrix $\rightarrow$ The xoron matrix pointer. \
> **input:** sp $\rightarrow$ The start point. \
> **input:** mkey $\rightarrow$ The monomial key (distance) \
> **output:** bkey $\rightarrow$ The binomial key pointer. \
> **inout:** settings $\rightarrow$ The run time settings. 

[comment]: <> ( docautocomplete xrn_make_binomial_key )



### xrn_make_binomial_key_wrapper

**Description:**

The **xrn_make_binomial_key_wrapper** function is used to generate a file storing a binomial key.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_make_binomial_key_wrapper ( 
    FILE * xrn_matrix_fpr,
    FILE * start_point_fpr,
    FILE * monomial_key_fpr,
    FILE * binomial_key_fpw,
    xrn_crypto_extra_settings_t settings 
); 
```

**Arguments description:**

> **input:** xrn_matrix_fpr $\rightarrow$ The xoron matrix file pointer. \
> **input:** start_point_fpr $\rightarrow$ The start point file pointer. \
> **input:** monomial_key_fpr $\rightarrow$ The monomial key (distance) file pointer. \
> **output:** binomial_key_fpw $\rightarrow$ The binomial key file pointer. \
> **inout:** settings $\rightarrow$ The run time settings. 

[comment]: <> ( docautocomplete xrn_make_binomial_key_wrapper )


### xrn_make_monomial_key

**Description:**

The **xrn_make_monomial_key** function is used to generate a monomial key.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_make_monomial_key ( 
    xmonomial_key_t * mkey,
    xrn_crypto_extra_settings_t  settings 
); 
```

**Arguments description:**

> **output:** mkey $\rightarrow$ The monomial key (distance) pointer. \
> **inout:** settings $\rightarrow$ The run time settings. 

[comment]: <> ( docautocomplete xrn_make_monomial_key )



### xrn_make_monomial_key_wrapper

**Description:**

The **xrn_make_monomial_key_wrapper** function is used to generate a file storing a monomial key.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_make_monomial_key_wrapper ( 
    FILE * monomial_key_fpw,
    xrn_crypto_extra_settings_t  settings 
); 
```

**Arguments description:**

> **output:** monomial_key_fpw $\rightarrow$ The monomial key file pointer. \
> **inout:** settings $\rightarrow$ The run time settings. 


[comment]: <> ( docautocomplete xrn_make_monomial_key_wrapper )


### make_xstart_point

**Description:**

The **make_xstart_point** function is used to generate xstart_point_t data structure.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_make_start_point ( 
    xstart_point_t * start,
    xrn_matrix_t * xrn_matrix,
    xrn_crypto_extra_settings_t settings 
);
```

**Arguments description:**

> **output:** start $\rightarrow$ The start point pointer. \
> **input:** xrn_matrix $\rightarrow$ The xoron matrix decompressed pointer. \
> **inout:** settings $\rightarrow$ The run time settings. 

[comment]: <> ( docautocomplete xrn_make_start_point )



### xrn_make_start_point_wrapper

**Description:**

The **xrn_make_start_point_wrapper** function is used to generate a file storing a xstart_point_t data structure.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_make_start_point_wrapper ( 
    FILE * start_point_fpw,
    FILE * xrn_matrix_fpr,
    xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **output:** start_point_fpw $\rightarrow$ The start point file pointer. \
> **input:** xrn_matrix_fpr $\rightarrow$ The xoron matrix decompressed file pointer. \
> **inout:** settings $\rightarrow$ The run time settings. 

[comment]: <> ( docautocomplete xrn_make_start_point_wrapper )




### xrn_make_commitment_from_binomial_key_wrapper

**Description:**

The **xrn_make_commitment_from_binomial_key_wrapper** function is used to generate two files storing a xbinomial_commitment_t and a xmonomial_commitment_t data structure.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_make_commitment_from_binomial_key_wrapper ( 
    FILE * binomial_key_fpr,
    FILE * xrn_matrix_fpr,
    FILE * monomial_commitment_fpw,
    FILE * binomial_commitment_fpw,
    xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **input:** binomial_key_fpr $\rightarrow$ The file pointer related to a binomial key. \
> **input:** xrn_matrix_fpr $\rightarrow$ The xoron matrix decompressed file pointer. \
> **output:** monomial_commitment_fpw $\rightarrow$The file pointer for the monomial commitment. \
> **output:** binomial_commitment_fpw $\rightarrow$The file pointer for the binomial commitment. \
> **inout:** settings $\rightarrow$ The run time settings. 

[comment]: <> ( docautocomplete xrn_make_commitment_from_binomial_key_wrapper )


### xrn_make_commitment_from_binomial_key

**Description:**

The **xrn_make_commitment_from_binomial_key** function is used to generate two files storing a xbinomial_commitment_t and a xmonomial_commitment_t data structure, starting from a binomial key.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_make_commitment_from_binomial_key ( 
    xbinomial_key_t binomial_key,
    xrn_matrix_t * xrn_matrix,
    xmonomial_commitment_t * monomial_commitment,
    xbinomial_commitment_t * binomial_commitment,
    xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **input:** binomial_key $\rightarrow$ The binomial key used as a reference for the commitment. \
> **input:** xrn_matrix $\rightarrow$ The xoron matrix decompressed pointer. \
> **output:** monomial_commitment $\rightarrow$ The pointer for the monomial commitment. \
> **output:** binomial_commitment $\rightarrow$ The pointer for the binomial commitment. \
> **inout:** settings $\rightarrow$ The run time settings. 

[comment]: <> ( docautocomplete xrn_make_commitment_from_binomial_key )


### xrn_make_commitment_from_sym_certificate_wrapper

**Description:**

The **xrn_make_commitment_from_sym_certificate_wrapper** function is used to generate two files storing a xbinomial_commitment_t and a xmonomial_commitment_t data structure.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_make_commitment_from_sym_certificate_wrapper ( 
    FILE * certificate_fpr,
    FILE * xrn_matrix_fpr,
    FILE * monomial_commitment_fpw,
    FILE * binomial_commitment_fpw,
    xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **input:** certificate_fpr $\rightarrow$ The file pointer related to a certificate. \
> **input:** xrn_matrix_fpr $\rightarrow$ The xoron matrix decompressed file pointer. \
> **output:** monomial_commitment_fpw $\rightarrow$The file pointer for the monomial commitment. \
> **output:** binomial_commitment_fpw $\rightarrow$The file pointer for the binomial commitment. \
> **inout:** settings $\rightarrow$ The run time settings. 

[comment]: <> ( docautocomplete xrn_make_commitment_from_sym_certificate_wrapper )


### xrn_make_commitment_from_sym_certificate

**Description:**

The **xrn_make_commitment_from_sym_certificate** function is used to generate two files storing a xbinomial_commitment_t and a xmonomial_commitment_t data structure, starting from a symmetric certificate.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_make_commitment_from_sym_certificate ( 
    xcertificate_sym_t certificate,
    xrn_matrix_t * xrn_matrix,
    xmonomial_commitment_t * monomial_commitment,
    xbinomial_commitment_t * binomial_commitment,
    xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **input:** certificate $\rightarrow$ The symmetric certificate. \
> **input:** xrn_matrix $\rightarrow$ The xoron matrix decompressed pointer. \
> **output:** monomial_commitment $\rightarrow$ The pointer for the monomial commitment. \
> **output:** binomial_commitment $\rightarrow$ The pointer for the binomial commitment. \
> **inout:** settings $\rightarrow$ The run time settings. 

[comment]: <> ( docautocomplete xrn_make_commitment_from_sym_certificate )


### xrn_make_commitment_from_sym_signatures_wrapper

**Description:**

The **xrn_make_commitment_from_sym_signatures_wrapper** function is used to generate two files storing a xbinomial_commitment_t and a xmonomial_commitment_t data structure.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_make_commitment_from_sym_signatures_wrapper ( 
    FILE * plain_text_fpr,
    FILE * xrn_matrix_fpr,
    FILE * signature_fpr,
    FILE * monomial_commitment_fpw,
    FILE * binomial_commitment_fpw,
    xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **input:** plain_text_fpr $\rightarrow$ The plain text message which has been signed. \
> **input:** xrn_matrix_fpr $\rightarrow$ The xoron matrix decompressed file pointer. \
> **input:** signature_fpr $\rightarrow$ The file pointer related to either a symmetric or asymmetric signature. \
> **output:** monomial_commitment_fpw $\rightarrow$The file pointer for the monomial commitment. \
> **output:** binomial_commitment_fpw $\rightarrow$The file pointer for the binomial commitment. \
> **inout:** settings $\rightarrow$ The run time settings. 

[comment]: <> ( docautocomplete xrn_make_commitment_from_sym_signatures_wrapper )


### xrn_make_commitment_from_sym_signature

**Description:**

The **xrn_make_commitment_from_sym_signature** function is used to generate two files storing a xbinomial_commitment_t and a xmonomial_commitment_t data structure, starting from a symmetric signature.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_make_commitment_from_sym_signature ( 
    FILE * plain_text_fpr,
    xrn_matrix_t * xrn_matrix,
    xsignature_sym_t signature,
    xmonomial_commitment_t * monomial_commitment,
    xbinomial_commitment_t * binomial_commitment,
    xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **input:** plain_text_fpr $\rightarrow$ The plain text message which has been signed. \
> **input:** xrn_matrix $\rightarrow$ The xoron matrix decompressed pointer. \
> **input:** signature $\rightarrow$ The symmetric signature. \
> **output:** monomial_commitment $\rightarrow$ The pointer for the monomial commitment. \
> **output:** binomial_commitment $\rightarrow$ The pointer for the binomial commitment. \
> **inout:** settings $\rightarrow$ The run time settings. 

[comment]: <> ( docautocomplete xrn_make_commitment_from_sym_signature )


### xrn_make_commitment_from_sym_signatures_bytes_wrapper

**Description:**

The **xrn_make_commitment_from_sym_signatures_bytes_wrapper** function is used to generate two files storing a xbinomial_commitment_t and a xmonomial_commitment_t data structure.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_make_commitment_from_sym_signatures_bytes_wrapper ( 
    uint8_t * in_bytes,
    uint64_t in_length,
    FILE * xrn_matrix_fpr,
    FILE * signature_fpr,
    FILE * monomial_commitment_fpw,
    FILE * binomial_commitment_fpw,
    xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **input:** in_bytes $\rightarrow$ The input bytes used to compute the signature. \
> **input:** in_length $\rightarrow$ The number of bytes. \
> **input:** xrn_matrix_fpr $\rightarrow$ The xoron matrix decompressed file pointer. \
> **input:** signature_fpr $\rightarrow$ The file pointer related to either a symmetric or asymmetric signature. \
> **output:** monomial_commitment_fpw $\rightarrow$The file pointer for the monomial commitment. \
> **output:** binomial_commitment_fpw $\rightarrow$The file pointer for the binomial commitment. \
> **inout:** settings $\rightarrow$ The run time settings. 

[comment]: <> ( docautocomplete xrn_make_commitment_from_sym_signatures_bytes_wrapper )


### xrn_make_commitment_from_sym_signature_bytes

**Description:**

The **xrn_make_commitment_from_sym_signature_bytes** function is used to generate two files storing a xbinomial_commitment_t and a xmonomial_commitment_t data structure, starting from a symmetric signature.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_make_commitment_from_sym_signature_bytes ( 
    uint8_t * in_bytes,
    uint64_t in_length,
    xrn_matrix_t * xrn_matrix,
    xsignature_sym_t signature,
    xmonomial_commitment_t * monomial_commitment,
    xbinomial_commitment_t * binomial_commitment,
    xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **input:** in_bytes $\rightarrow$ The input bytes used to compute the signature. \
> **input:** in_length $\rightarrow$ The number of bytes. \
> **input:** xrn_matrix $\rightarrow$ The xoron matrix decompressed pointer. \
> **input:** signature $\rightarrow$ The symmetric signature. \
> **output:** monomial_commitment $\rightarrow$ The pointer for the monomial commitment. \
> **output:** binomial_commitment $\rightarrow$ The pointer for the binomial commitment. \
> **inout:** settings $\rightarrow$ The run time settings. 

[comment]: <> ( docautocomplete xrn_make_commitment_from_sym_signature_bytes )




### xrn_make_monomial_response_wrapper

**Description:**

The **xrn_make_monomial_response_wrapper** function is used to generate a file storing a xmonomial_response_t data structure.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_make_monomial_response_wrapper ( 
    FILE * monomial_response_fpw,
    xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **output:** monomial_response_fpw $\rightarrow$ The file pointer for the monomial response. \
> **inout:** settings $\rightarrow$ The run time settings. 

[comment]: <> ( docautocomplete xrn_make_monomial_response_wrapper )


### xrn_make_monomial_response

**Description:**

The **xrn_make_monomial_response** function is used to generate a file storing a xmonomial_response_t data structure.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_make_monomial_response ( 
    xmonomial_response_t * monomial_response,
    xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **output:** monomial_response $\rightarrow$The pointer for the monomial response. \
> **inout:** settings $\rightarrow$ The run time settings. 

[comment]: <> ( docautocomplete xrn_make_monomial_response )


### xrn_make_monomial_proof_wrapper

**Description:**

The **xrn_make_monomial_proof_wrapper** function is used to generate a file storing a xmonomial_proof_t data structure.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_make_monomial_proof_wrapper ( 
    FILE * xrn_matrix_fpr,
    FILE * binomial_key_fpr,
    FILE * monomial_key_fpr,
    FILE * monomial_commitment_fpr,
    FILE * monomial_response_fpr,
    FILE * monomial_proof_fpw,
    xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **input:** xrn_matrix_fpr $\rightarrow$ The xoron matrix decompressed file pointer. \
> **input:** binomial_key_fpr $\rightarrow$ The file pointer for the binomial key used to generate the monomial commitment. \
> **input:** monomial_key_fpr $\rightarrow$ The file pointer for the monomial key related to the binomial key. \
> **input:** monomial_commitment_fpr $\rightarrow$ The file pointer for the monomial commitment. \
> **input:** monomial_response_fpr $\rightarrow$ The file pointer for the monomial response to the commitment. \
> **input:** monomial_proof_fpw $\rightarrow$ The file pointer for the monomial proof. \
> **inout:** settings $\rightarrow$ The run time settings. 

[comment]: <> ( docautocomplete xrn_make_monomial_proof_wrapper )


### xrn_make_monomial_proof

**Description:**

The **xrn_make_monomial_proof** function is used to generate a file storing a xmonomial_proof_t data structure.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_make_monomial_proof ( 
    xrn_matrix_t * xrn_matrix,
    xbinomial_key_t binomial_key,
    xmonomial_key_t monomial_key,
    xmonomial_commitment_t monomial_commitment,
    xmonomial_response_t monomial_response,
    xmonomial_proof_t * monomial_proof,
    xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **input:** xrn_matrix $\rightarrow$ The xoron matrix decompressed pointer. \
> **input:** binomial_key $\rightarrow$ The binomial key used to generate the monomial commitment. \
> **input:** monomial_key $\rightarrow$ The monomial key related to the binomial key. \
> **input:** monomial_commitment $\rightarrow$ The monomial commitment. \
> **input:** monomial_response $\rightarrow$ The monomial response to the commitment. \
> **output:** monomial_proof $\rightarrow$ The pointer for the monomial proof. \
> **inout:** settings $\rightarrow$ The run time settings. 

[comment]: <> ( docautocomplete xrn_make_monomial_proof )



### xrn_make_monomial_proof_from_signature_wrapper

**Description:**

The **xrn_make_monomial_proof_from_signature_wrapper** function is used to generate a file storing a xmonomial_proof_t data structure.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_make_monomial_proof_from_signature_wrapper ( 
    FILE * plain_text_fpr,
    FILE * xrn_matrix_fpr,
    FILE * signature_fpr,
    FILE * monomial_key_fpr,
    FILE * monomial_commitment_fpr,
    FILE * monomial_response_fpr,
    FILE * monomial_proof_fpw,
    xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **input:** plain_text_fpr $\rightarrow$ The plain text file pointer. \
> **input:** xrn_matrix_fpr $\rightarrow$ The xoron matrix decompressed file pointer. \
> **input:** signature_fpr $\rightarrow$ The file pointer for the signature. \
> **input:** monomial_key_fpr $\rightarrow$ The file pointer for the monomial key related to the binomial key. \
> **input:** monomial_commitment_fpr $\rightarrow$ The file pointer for the monomial commitment. \
> **input:** monomial_response_fpr $\rightarrow$ The file pointer for the monomial response to the commitment. \
> **input:** monomial_proof_fpw $\rightarrow$ The file pointer for the monomial proof. \
> **inout:** settings $\rightarrow$ The run time settings. 

[comment]: <> ( docautocomplete xrn_make_monomial_proof_from_signature_wrapper )


### xrn_make_monomial_proof_from_signature

**Description:**

The **xrn_make_monomial_proof_from_signature** function is used to generate a file storing a xmonomial_proof_t data structure.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_make_monomial_proof_from_signature ( 
    FILE * plain_text_fpr,
    xrn_matrix_t * xrn_matrix,
    xsignature_sym_t signature,
    xmonomial_key_t monomial_key,
    xmonomial_commitment_t monomial_commitment,
    xmonomial_response_t monomial_response,
    xmonomial_proof_t * monomial_proof,
    xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **input:** plain_text_fpr $\rightarrow$ The plain text file pointer. \
> **input:** xrn_matrix $\rightarrow$ The xoron matrix decompressed pointer. \
> **input:** signature $\rightarrow$ The symmetric signature. \
> **input:** monomial_key $\rightarrow$ The monomial key related to the binomial key. \
> **input:** monomial_commitment $\rightarrow$ The monomial commitment. \
> **input:** monomial_response $\rightarrow$ The monomial response to the commitment. \
> **output:** monomial_proof $\rightarrow$ The pointer for the monomial proof. \
> **inout:** settings $\rightarrow$ The run time settings. 

[comment]: <> ( docautocomplete xrn_make_monomial_proof_from_signature )





### xrn_make_monomial_proof_from_signature_bytes_wrapper

**Description:**

The **xrn_make_monomial_proof_from_signature_bytes_wrapper** function is used to generate a file storing a xmonomial_proof_t data structure.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_make_monomial_proof_from_signature_bytes_wrapper ( 
    uint8_t * in_bytes,
    uint64_t in_length,
    FILE * xrn_matrix_fpr,
    FILE * signature_fpr,
    FILE * monomial_key_fpr,
    FILE * monomial_commitment_fpr,
    FILE * monomial_response_fpr,
    FILE * monomial_proof_fpw,
    xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **input:** in_bytes $\rightarrow$ The input plain text byte stream. \
> **input:** in_length $\rightarrow$ The length of the input plain text byte stream. \
> **input:** xrn_matrix_fpr $\rightarrow$ The xoron matrix decompressed file pointer. \
> **input:** signature_fpr $\rightarrow$ The file pointer for the signature. \
> **input:** monomial_key_fpr $\rightarrow$ The file pointer for the monomial key related to the binomial key. \
> **input:** monomial_commitment_fpr $\rightarrow$ The file pointer for the monomial commitment. \
> **input:** monomial_response_fpr $\rightarrow$ The file pointer for the monomial response to the commitment. \
> **input:** monomial_proof_fpw $\rightarrow$ The file pointer for the monomial proof. \
> **inout:** settings $\rightarrow$ The run time settings. 

[comment]: <> ( docautocomplete xrn_make_monomial_proof_from_signature_bytes_wrapper )


### xrn_make_monomial_proof_from_signature_bytes

**Description:**

The **xrn_make_monomial_proof_from_signature_bytes** function is used to generate a file storing a xmonomial_proof_t data structure.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_make_monomial_proof_from_signature_bytes ( 
    uint8_t * in_bytes,
    uint64_t in_length,
    xrn_matrix_t * xrn_matrix,
    xsignature_sym_t signature,
    xmonomial_key_t monomial_key,
    xmonomial_commitment_t monomial_commitment,
    xmonomial_response_t monomial_response,
    xmonomial_proof_t * monomial_proof,
    xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **input:** in_bytes $\rightarrow$ The input plain text byte stream. \
> **input:** in_length $\rightarrow$ The length of the input plain text byte stream. \
> **input:** xrn_matrix $\rightarrow$ The xoron matrix decompressed pointer. \
> **input:** signature $\rightarrow$ The symmetric signature. \
> **input:** monomial_key $\rightarrow$ The monomial key related to the binomial key. \
> **input:** monomial_commitment $\rightarrow$ The monomial commitment. \
> **input:** monomial_response $\rightarrow$ The monomial response to the commitment. \
> **output:** monomial_proof $\rightarrow$ The pointer for the monomial proof. \
> **inout:** settings $\rightarrow$ The run time settings. 

[comment]: <> ( docautocomplete xrn_make_monomial_proof_from_signature_bytes )




### xrn_make_monomial_proof_from_sym_certificate_wrapper

**Description:**

The **xrn_make_monomial_proof_from_sym_certificate_wrapper** function is used to generate a file storing a xmonomial_proof_t data structure.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_make_monomial_proof_from_sym_certificate_wrapper ( 
    FILE * xrn_matrix_fpr,
    FILE * certificate_fpr,
    FILE * monomial_key_fpr,
    FILE * monomial_commitment_fpr,
    FILE * monomial_response_fpr,
    FILE * monomial_proof_fpw,
    xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **input:** xrn_matrix_fpr $\rightarrow$ The xoron matrix decompressed file pointer. \
> **input:** certificate_fpr $\rightarrow$ The file pointer for the certificate. \
> **input:** monomial_key_fpr $\rightarrow$ The file pointer for the monomial key related to the binomial key. \
> **input:** monomial_commitment_fpr $\rightarrow$ The file pointer for the monomial commitment. \
> **input:** monomial_response_fpr $\rightarrow$ The file pointer for the monomial response to the commitment. \
> **input:** monomial_proof_fpw $\rightarrow$ The file pointer for the monomial proof. \
> **inout:** settings $\rightarrow$ The run time settings. 

[comment]: <> ( docautocomplete xrn_make_monomial_proof_from_sym_certificate_wrapper )


### xrn_make_monomial_proof_from_sym_certificate

**Description:**

The **xrn_make_monomial_proof_from_sym_certificate** function is used to generate a file storing a xmonomial_proof_t data structure.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_make_monomial_proof_from_sym_certificate ( 
    xrn_matrix_t * xrn_matrix,
    xcertificate_sym_t certificate,
    xmonomial_key_t monomial_key,
    xmonomial_commitment_t monomial_commitment,
    xmonomial_response_t monomial_response,
    xmonomial_proof_t * monomial_proof,
    xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **input:** xrn_matrix $\rightarrow$ The xoron matrix decompressed pointer. \
> **input:** certificate $\rightarrow$ The symmetric certificate. \
> **input:** monomial_key $\rightarrow$ The monomial key related to the binomial key. \
> **input:** monomial_commitment $\rightarrow$ The monomial commitment. \
> **input:** monomial_response $\rightarrow$ The monomial response to the commitment. \
> **output:** monomial_proof $\rightarrow$ The pointer for the monomial proof. \
> **inout:** settings $\rightarrow$ The run time settings. 

[comment]: <> ( docautocomplete xrn_make_monomial_proof_from_sym_certificate )


## Xoron Matrix function

Xoron matrix functions are used to manipulate Xoron matrices using security primitives defined in the Xoron cryptography library.

### xrn_permute_matrix_compressed_deterministically_wrapper

**Description:**

The **xrn_permute_matrix_compressed_deterministically_wrapper** is used to permute the Xoron matrix in a predictible way.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_permute_matrix_compressed_deterministically_wrapper ( 
    FILE * xrn_matrix_compressed_fpr,
    FILE * xrn_matrix_fpr,
    FILE * xrn_matrix_compressed_fpw,
    xrn_crypto_extra_settings_t settings 
); 
```

**Arguments description:**

> **input:** xrn_matrix_compressed_fpr $\rightarrow$ The file pointer to the compressed Xoron matrix. \
> **input:** xrn_matrix_fpr $\rightarrow$ The file pointer to the Xoron matrix. \
> **output:** xrn_matrix_compressed_fpw $\rightarrow$The file pointer to the permuted compressed Xoron matrix. \
> **inout:** settings $\rightarrow$ The run time settings. 

[comment]: <> ( docautocomplete xrn_permute_matrix_compressed_deterministically_wrapper )


### xrn_permute_matrix_compressed_deterministically

**Description:**

The **xrn_permute_matrix_compressed_deterministically** is used to permute the Xoron matrix in a predictible way.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_permute_matrix_compressed_deterministically ( 
    xrn_matrix_compressed_t * in_xrn_matrix_compressed,
    xrn_matrix_t * xrn_matrix,
    xrn_matrix_compressed_t * out_xrn_matrix_compressed,
    xrn_crypto_extra_settings_t settings 
); 
```

**Arguments description:**

> **input:** in_xrn_matrix_compressed $\rightarrow$ The pointer to the compressed Xoron matrix. \
> **input:** xrn_matrix $\rightarrow$ The pointer to the Xoron matrix. \
> **output:** out_xrn_matrix_compressed $\rightarrow$The pointer to the permuted compressed Xoron matrix. \
> **inout:** settings $\rightarrow$ The run time settings. 

[comment]: <> ( docautocomplete xrn_permute_matrix_compressed_deterministically )


### xrn_permute_matrix_compressed_key_wrapper

**Description:**

The **xrn_permute_matrix_compressed_key_wrapper** is used to permute the Xoron matrix in a predictible way.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_permute_matrix_compressed_key_wrapper ( 
    FILE * xrn_matrix_compressed_fpr,
    FILE * xrn_matrix_fpr,
    FILE * monomial_key_fpr,
    FILE * xrn_matrix_compressed_fpw,
    xrn_crypto_extra_settings_t settings 
); 
```

**Arguments description:**

> **input:** xrn_matrix_compressed_fpr $\rightarrow$ The file pointer to the compressed Xoron matrix. \
> **input:** xrn_matrix_fpr $\rightarrow$ The file pointer to the Xoron matrix. \
> **input:** monomial_key_fpr $\rightarrow$ The file pointer to the Xoron monomial key. \
> **output:** xrn_matrix_compressed_fpw $\rightarrow$The file pointer to the permuted compressed Xoron matrix. \
> **inout:** settings $\rightarrow$ The run time settings. 

[comment]: <> ( docautocomplete xrn_permute_matrix_compressed_key_wrapper )


### xrn_permute_matrix_compressed_key

**Description:**

The **xrn_permute_matrix_compressed_key** is used to permute the Xoron matrix in a predictible way.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_permute_matrix_compressed_key ( 
    xrn_matrix_compressed_t * in_xrn_matrix_compressed,
    xrn_matrix_t * xrn_matrix,
    xmonomial_key_t monomial_key,
    xrn_matrix_compressed_t * out_xrn_matrix_compressed,
    xrn_crypto_extra_settings_t settings 
); 
```

**Arguments description:**

> **input:** in_xrn_matrix_compressed $\rightarrow$ The pointer to the compressed Xoron matrix. \
> **input:** xrn_matrix $\rightarrow$ The pointer to the Xoron matrix. \
> **input:** monomial_key $\rightarrow$ The monomial key. \
> **output:** out_xrn_matrix_compressed $\rightarrow$The pointer to the permuted compressed Xoron matrix. \
> **inout:** settings $\rightarrow$ The run time settings. 

[comment]: <> ( docautocomplete xrn_permute_matrix_compressed_key )


## Helper functions

Helper functions are not used directly to perform cryptography. 
Those functions are used to help developers to write code while using the library.

### xrn_dump_library_info

**Description:**

The **xrn_dump_library_info** is used to print the library version, revision control and magic number information.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_dump_library_info( 
);
```

[comment]: <> ( docautocomplete xrn_dump_library_info)


### xrn_print_metadata

**Description:**

The **xrn_print_metadata** is used to print file decoded data and metadata.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_print_metadata( 
    FILE * fpi, 
    xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **input:** fpi $\rightarrow$ The input file pointer. \
> **inout:** settings $\rightarrow$ The run time settings. 

[comment]: <> ( docautocomplete xrn_print_metadata)



### xrn_name_2_type

**Description:**

The **xrn_name_2_type** is used to get a xrn_lib_xtype_t type starting from the name of a function and run time settings.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_name_2_type ( 
    char * function_name, 
    xrn_lib_xtype_t * type, 
    xrn_crypto_extra_settings_t settings 
);
```

**Arguments description:**

> **input:** function_name $\rightarrow$ The name of the function. \
> **output:** type $\rightarrow$ The type associated with the function name. \
> **inout:** settings $\rightarrow$ The run time settings. 

[comment]: <> ( docautocomplete xrn_name_2_type )



### xrn_name_2_types

**Description:**

The **xrn_name_2_types** is used to get a xrn_lib_xtype_t types starting from the name of a function and run time settings.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_name_2_types ( 
    char * function_name, 
    xrn_lib_xtype_t * challenge_type, 
    xrn_lib_xtype_t * solution_type, 
    xrn_crypto_extra_settings_t settings 
);
```

**Arguments description:**

> **input:** function_name $\rightarrow$ The name of the function. \
> **output:** challenge_type $\rightarrow$The challenge type associated with the function name. \
> **output:** solution_type $\rightarrow$ The solution type associated with the function name. \
> **inout:** settings $\rightarrow$ The run time settings. 

[comment]: <> ( docautocomplete xrn_name_2_types )



### xrn_estimate_solution_block_bytes_length

**Description:**

The **xrn_estimate_solution_block_bytes_length** is used to get a solution block size.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_estimate_solution_block_bytes_length ( 
);
```

[comment]: <> ( docautocomplete xrn_estimate_solution_block_bytes_length )


### xrn_estimate_challenge_block_bytes_length

**Description:**

The **xrn_estimate_challenge_block_bytes_length** is used to get a challenge block size.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_estimate_challenge_block_bytes_length ( 
    xrn_crypto_extra_settings_t settings 
);
```

**Arguments description:**

> **inout:** settings $\rightarrow$ The run time settings. 

[comment]: <> ( docautocomplete xrn_estimate_challenge_block_bytes_length )



### xrn_estimate_decrypted_block_bytes_length

**Description:**

The **xrn_estimate_decrypted_block_bytes_length** is used to get a plain text block size.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_estimate_decrypted_block_bytes_length  (
    xrn_crypto_extra_settings_t settings 
);
```

**Arguments description:**

> **inout:** settings $\rightarrow$ The run time settings. 

[comment]: <> ( docautocomplete xrn_estimate_decrypted_block_bytes_length  )



### xrn_estimate_encrypted_block_bytes_length

**Description:**

The **xrn_estimate_encrypted_block_bytes_length** is used to get the size of a header given the type of file-bytes.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_estimate_encrypted_block_bytes_length ( 
     xrn_lib_xtype_t type, 
     xrn_crypto_extra_settings_t settings 
);
```

**Arguments description:**

> **input:** type $\rightarrow$ Type of file-bytes. \
> **inout:** settings $\rightarrow$ The run time settings. 

[comment]: <> ( docautocomplete xrn_estimate_encrypted_block_bytes_length )


### xrn_convert_type_wrapper

**Description:**

The **xrn_convert_type_wrapper** is used to convert one file type into another.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_convert_type_wrapper ( 
     FILE * fpi,
     FILE * fpo,
     xrn_lib_xtype_t in_type,
     xrn_lib_xtype_t out_type,
     xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **input:** fpi $\rightarrow$ The input file pointer. \
> **output:** fpo $\rightarrow$ The output file pointer. \
> **input:** in_type $\rightarrow$ The input file-bytes type. \
> **input:** out_type $\rightarrow$ The output file-bytes type. \
> **inout:** settings $\rightarrow$ The run time settings. 


|   Input             | Output               |
| :-----------------  | :------------------  |
 xstart               | xrn_point            |
 xrn_point            | xstart               |
 xstart               | xmonomial_key        |
 xmonomial_key        | xstart               |
 xrn_point            | xmonomial_key        |
 xmonomial_key        | xrn_point            |
 xhash                | xstart               |
 xhash                | xrn_point            |
 xhash                | xmonomial_key        |
 xmonomial_response   | xmonomial_key        |
 xmonomial_key        | xmonomial_response   |
 xmonomial_proof      | xmonomial_key        |
 xmonomial_key        | xmonomial_proof      |
 xmonomial_commitment | xmonomial_key        |
 xmonomial_key        | xmonomial_commitment |
 xbinomial_commitment | xbinomial_key        |
 xbinomial_key        | xbinomial_commitment |
:Supported Conversions.

[comment]: <> ( docautocomplete xrn_convert_type_wrapper )



### xrn_estimate_encryption_bytes_length

**Description:**

The **xrn_estimate_encryption_bytes_length** is used to estimate the output encrypted buffer size.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_estimate_encryption_bytes_length( 
     xrn_lib_xtype_t type,
     uint64_t input_buff_length,
     uint64_t *output_buff_length,
     xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **input:** type $\rightarrow$ The type of byte streams to encrypt. \
> **input:** input_buff_length $\rightarrow$ The length of the byte stream to encrypt. \
> **output:** output_buff_length $\rightarrow$The estimated length of the output stream in bytes. \
> **inout:** settings $\rightarrow$ The run time settings. 

[comment]: <> ( docautocomplete xrn_estimate_encryption_bytes_length)


### xrn_estimate_decryption_bytes_length

**Description:**

The **xrn_estimate_decryption_bytes_length** is used to estimate the output decrypted buffer size.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_estimate_decryption_bytes_length(
     xrn_lib_xtype_t type,
     uint64_t input_buff_length,
     uint64_t *output_buff_length, xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **input:** type $\rightarrow$ The type of byte streams to encrypt. \
> **input:** input_buff_length $\rightarrow$ The length of the bytes to encrypt. \
> **output:** output_buff_length $\rightarrow$The estimated length in bytes of the decrypted stream. \
> **inout:** settings $\rightarrow$ The run time settings. 

[comment]: <> ( docautocomplete xrn_estimate_decryption_bytes_length)


### xrn_estimate_split_bytes_length

**Description:**

The **xrn_estimate_split_bytes_length** is used to estimate the output encrypted challenge and solution buffer sizes.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_estimate_split_bytes_length(
     xrn_lib_xtype_t type,
     uint64_t input_buff_length,
     uint64_t *output_buff_challenge_length,
     uint64_t *output_buff_solution_length,
     xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **input:** type $\rightarrow$ The type of byte streams to encrypt. \
> **input:** input_buff_length $\rightarrow$ The length in bytes of the input stream to encrypt. \
> **output:** output_buff_challenge_length $\rightarrow$The length in bytes of the challenge stream. \
> **output:** output_buff_solution_length $\rightarrow$ The length in bytes of the solution stream. \
> **inout:** settings $\rightarrow$ The run time settings. 

[comment]: <> ( docautocomplete xrn_estimate_split_bytes_length)


### xrn_estimate_join_bytes_length

**Description:**

The **xrn_estimate_join_bytes_length** is used to estimate the output decrypted bytes from the size of the challenge and solution buffer sizes.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_estimate_join_bytes_length ( 
     uint64_t input_buff_challenge_length,
     uint64_t *output_buff_length,
     xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **input:** input_buff_challenge_length $\rightarrow$ The length in bytes of the input challenge stream. \
> **output:** output_buff_length $\rightarrow$ The length of the estimated decrypted bytes. \
> **inout:** settings $\rightarrow$ The run time settings. 

[comment]: <> ( docautocomplete xrn_estimate_join_bytes_length )



## Pseudo Random Number Generator

### xrn_generate_confidential_pseudo_random_number_wrapper

**Description:**

The **xrn_generate_confidential_pseudo_random_number_wrapper** is used to generate pseudo random numbers with a xoron monomial key.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_generate_confidential_pseudo_random_number_wrapper ( 
     FILE * point_start_fpr,
     FILE * monomial_key_fpr,
     FILE * xrn_matrix_fpr,
     FILE * point_end_fpw,
     xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **input:** point_start_fpr $\rightarrow$ The source pseudo random number file pointer. \
> **input:** monomial_key_fpr $\rightarrow$ The monomial key file pointer. \
> **input:** xrn_matrix_fpr $\rightarrow$ The decompressed xoron matrix file pointer. \
> **output:** point_end_fpw $\rightarrow$ The destination pseudo random number file pointer. \
> **inout:** settings $\rightarrow$ The run time settings. 

[comment]: <> ( docautocomplete xrn_generate_confidential_pseudo_random_number_wrapper )



### xrn_generate_confidential_pseudo_random_number

**Description:**

The **xrn_generate_confidential_pseudo_random_number** is used to generate pseudo random numbers with a xoron monomial key.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_generate_confidential_pseudo_random_number (
     xrn_point_t point_start,
     xmonomial_key_t monomial_key,
     xrn_matrix_t * xrn_matrix,
     xrn_point_t * point_end,
     xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **input:** point_start $\rightarrow$ The source pseudo random number. \
> **input:** monomial_key $\rightarrow$ The monomial key file pointer. \
> **input:** xrn_matrix $\rightarrow$ The decompressed xoron matrix pointer. \
> **output:** point_end $\rightarrow$ The destination pseudo random number pointer. \
> **inout:** settings $\rightarrow$ The run time settings. 

[comment]: <> ( docautocomplete xrn_generate_confidential_pseudo_random_number )


## Key Exchange

### xrn_exchange_monomial_key_wrapper

**Description:**

The **xrn_exchange_monomial_key_wrapper** is used to exchange a xoron monomial key.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_exchange_monomial_key_wrapper (
     FILE * xrn_matrix_fpr,
     FILE * internal_binomial_key_fpr,
     FILE * external_binomial_key_fpr,
     FILE * monomial_key_fpr,
     FILE * shared_key_fpw,
     xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **input:** xrn_matrix_fpr $\rightarrow$ The decompressed xoron matrix file pointer. \
> **input:** internal_binomial_key_fpr $\rightarrow$ The binomial key file pointer associated with the monomial key. \
> **input:** external_binomial_key_fpr $\rightarrow$ The binomial key file pointer not associated with the monomial key. \
> **input:** monomial_key_fpr $\rightarrow$ The monomial key file pointer. \
> **output:** shared_key_fpw $\rightarrow$ The shared monomial key. \
> **inout:** settings $\rightarrow$ The run time settings. 

[comment]: <> ( docautocomplete xrn_exchange_monomial_key_wrapper )


### xrn_exchange_monomial_key

**Description:**

The **xrn_exchange_monomial_key** is used to exchange a xoron monomial key.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_exchange_monomial_key ( 
     xrn_matrix_t * xrn_matrix,
     xbinomial_key_t  internal_binomial_key,
     xbinomial_key_t  external_binomial_key,
     xmonomial_key_t  monomial_key,
     xmonomial_key_t  * shared_key,
     xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **input:** xrn_matrix $\rightarrow$ The decompressed xoron matrix pointer. \
> **input:** internal_binomial_key $\rightarrow$ The binomial key associated with the monomial key. \
> **input:** external_binomial_key $\rightarrow$ The binomial key not associated with the monomial key. \
> **input:** monomial_key $\rightarrow$ The monomial key. \
> **output:** shared_key $\rightarrow$ The shared monomial key pointer. \
> **inout:** settings $\rightarrow$ The run time settings. 

[comment]: <> ( docautocomplete xrn_exchange_monomial_key )


### xrn_exchange_polyvalent_key_wrapper

**Description:**

The **xrn_exchange_polyvalent_key_wrapper** is used to exchange a xoron polyvalent key.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_exchange_polyvalent_key_wrapper ( 
     FILE * xrn_matrix_fpr,
     FILE * internal_monovalent_key_fpr,
     FILE * external_monovalent_key_fpr, 
     FILE * polyvalent_key_fpr,
     FILE * polyvalent_proof_fpr, 
     FILE * shared_polyvalent_key_fpw,
     xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **input:** xrn_matrix_fpr $\rightarrow$ The decompressed xoron matrix file pointer. \
> **input:** internal_monovalent_key_fpr $\rightarrow$ The monovalent key file pointer associated with the polyvalent key. \
> **input:** external_monovalent_key_fpr $\rightarrow$ The monovalent key file pointer not associated with the polyvalent key. \
> **input:** polyvalent_key_fpr $\rightarrow$ The polyvalant key file pointer. \
> **input:** polyvalent_proof_fpr $\rightarrow$ The polyvalant proof file pointer. \
> **output:** shared_polyvalent_key_fpw $\rightarrow$ The shared monomial key. \
> **inout:** settings $\rightarrow$ The run time settings. 

[comment]: <> ( docautocomplete xrn_exchange_polyvalent_key_wrapper )


### xrn_exchange_polyvalent_key

**Description:**

The **xrn_exchange_polyvalent_key** is used to exchange a xoron polyvalent key.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_exchange_polyvalent_key ( 
     xrn_matrix_t * xrn_matrix, 
     xmonovalent_key_t * internal_monovalent_key,
     xmonovalent_key_t * external_monovalent_key,
     xpolyvalent_key_t * polyvalent_key, 
     xpolyvalent_proof_t * polyvalent_proof,
     xpolyvalent_key_t * shared_polyvalent_key,
     xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **input:** xrn_matrix $\rightarrow$ The decompressed xoron matrix file pointer. \
> **input:** internal_monovalent_key $\rightarrow$ The monovalent key associated with the polyvalent key. \
> **input:** external_monovalent_key $\rightarrow$ The monovalent key not associated with the polyvalent key. \
> **input:** polyvalent_key $\rightarrow$ The polyvalant key. \
> **input:** polyvalent_proof $\rightarrow$ The polyvalant proof. \
> **output:** shared_polyvalent_key $\rightarrow$ The shared monomial key. \
> **inout:** settings $\rightarrow$ The run time settings. 


[comment]: <> ( docautocomplete xrn_exchange_polyvalent_key )


## Monovalent Key Verification

### xrn_check_monovalent_key

**Description:**

The **xrn_check_monovalent_key** is used to verify the validity of a monovalent key.
This function can be used to verify that the key exchange succeded.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_check_monovalent_key( 
     xrn_matrix_t * xrn_matrix,
     xmonovalent_key_t * monovalent_key,
     xpolyvalent_proof_t * polyvalent_proof,
     xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **input:** xrn_matrix $\rightarrow$ The decompressed xoron matrix pointer. \
> **input:** monovalent_key $\rightarrow$ The monovalent key associated with the proof. \
> **input:** polyvalent_proof $\rightarrow$ The polyvalant proof. \
> **inout:** settings $\rightarrow$ The run time settings. 


[comment]: <> ( docautocomplete xrn_check_monovalent_key)



### xrn_check_monovalent_key_wrapper

**Description:**

The **xrn_check_monovalent_key_wrapper** is used to verify the validity of a monovalent key.


**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_check_monovalent_key_wrapper ( 
     FILE * xrn_matrix_fpr,
     FILE * monovalent_key_fpr,
     FILE * polyvalent_proof_fpr,
     xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **input:** xrn_matrix_fpr $\rightarrow$ The decompressed xoron matrix file pointer. \
> **input:** monovalent_key_fpr $\rightarrow$ The monovalent key associated with the proof file pointer. \
> **input:** polyvalent_proof_fpr $\rightarrow$ The polyvalant proof file pointer. \
> **inout:** settings $\rightarrow$ The run time settings. 


[comment]: <> ( docautocomplete xrn_check_monovalent_key_wrapper )


## Symmetric Encoder Decoder

### xrn_decode_encode_wrapper

**Description:**

The **xrn_decode_encode_wrapper** is used to encode the entire input file stream.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_decode_encode_wrapper ( 
     FILE * input_file_fpr,
     FILE * encoded_file_fpw,
     xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **input:** input_file_fpr $\rightarrow$ The plain text input file pointer. \
> **output:** encoded_file_fpw $\rightarrow$ The encoded file pointer. \
> **inout:** settings $\rightarrow$ The run time settings. 

[comment]: <> ( docautocomplete xrn_decode_encode_wrapper )



### xrn_decode_encode_bytes_wrapper

**Description:**

The **xrn_decode_encode_bytes_wrapper** is used to encode the stream of bytes.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_decode_encode_bytes_wrapper ( 
     uint8_t * in_bytes,
     uint8_t * out_bytes,
     uint64_t length,
     xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **input:** in_bytes $\rightarrow$ The input plain text byte stream. \
> **output:** out_bytes $\rightarrow$ The output encrypted byte stream. \
> **input:** length $\rightarrow$ The length of the input and output bytes. \
> **inout:** settings $\rightarrow$ The run time settings. 


[comment]: <> ( docautocomplete xrn_decode_encode_bytes_wrapper )



## Symmetric Stream Encryption

### xrn_encrypt_symmetric_wrapper

**Description:**

The **xrn_encrypt_symmetric_wrapper** is used to encrypt the entire input file stream with a monomial key.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_encrypt_symmetric_wrapper ( 
     FILE * input_file_fpr,
     FILE * xrn_matrix_fpr,
     FILE * monomial_key_fpr,
     FILE * encrypted_file_fpw,
     xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **input:** input_file_fpr $\rightarrow$ The plain text input file pointer. \
> **input:** xrn_matrix_fpr $\rightarrow$ The decompressed xoron matrix file pointer. \
> **input:** monomial_key_fpr $\rightarrow$ The monomial key file pointer. \
> **output:** encrypted_file_fpw $\rightarrow$ The encrypted file pointer. \
> **inout:** settings $\rightarrow$ The run time settings. 

[comment]: <> ( docautocomplete xrn_encrypt_symmetric_wrapper )


### xrn_encrypt_symmetric

**Description:**

The **xrn_encrypt_symmetric** is used to encrypt the entire input file stream with a monomial key.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_encrypt_symmetric ( 
     FILE * input_file_fpr,
     xrn_matrix_t * xrn_matrix,
     xmonomial_key_t monomial_key,
     FILE * encrypted_file_fpw,
     xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **input:** input_file_fpr $\rightarrow$ The plain text input file pointer. \
> **input:** xrn_matrix $\rightarrow$ The decompressed xoron matrix pointer. \
> **input:** monomial_key $\rightarrow$ The monomial key. \
> **output:** encrypted_file_fpw $\rightarrow$ The encrypted file pointer. \
> **inout:** settings $\rightarrow$ The run time settings. 


[comment]: <> ( docautocomplete xrn_encrypt_symmetric )


### xrn_encrypt_symmetric_bytes_wrapper

**Description:**

The **xrn_encrypt_symmetric_bytes_wrapper** is used to encrypt the stream of bytes with a monomial key.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_encrypt_symmetric_bytes_wrapper ( 
     uint8_t * in_bytes,
     uint64_t in_length,
     uint8_t * out_bytes,
     uint64_t out_length,
     uint64_t * num_encoded_bytes,
     FILE * xrn_matrix_fpr,
     FILE * monomial_key_fpr,
     xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **input:** in_bytes $\rightarrow$ The input plain text byte stream. \
> **input:** in_length $\rightarrow$ The length of the input bytes. \
> **output:** out_bytes $\rightarrow$ The output encrypted byte stream. \
> **input:** out_length $\rightarrow$ The length of the output bytes stream. \
> **output:** num_encoded_bytes $\rightarrow$ The number of encrypted bytes. \
> **input:** xrn_matrix_fpr $\rightarrow$ The decompressed xoron matrix file pointer. \
> **input:** monomial_key_fpr $\rightarrow$ The xoron monomial key file pointer used to encrypt the byte stream. \
> **inout:** settings $\rightarrow$ The run time settings. 


[comment]: <> ( docautocomplete xrn_encrypt_symmetric_bytes_wrapper )



### xrn_encrypt_symmetric_bytes

**Description:**

The **xrn_encrypt_symmetric_bytes** is used to encrypt the stream of bytes with a monomial key.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_encrypt_symmetric_bytes ( 
     uint8_t * in_bytes,
     uint64_t in_length,
     uint8_t * out_bytes,
     uint64_t out_length,
     uint64_t * num_encoded_bytes,
     xrn_matrix_t * xrn_matrix,
     xmonomial_key_t monomial_key,
     xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **input:** in_bytes $\rightarrow$ The input plain text byte stream. \
> **input:** in_length $\rightarrow$ The length of the input bytes. \
> **output:** out_bytes $\rightarrow$ The output encrypted byte stream. \
> **input:** out_length $\rightarrow$ The length of the output bytes stream. \
> **output:** num_encoded_bytes $\rightarrow$ The number of encrypted bytes. \
> **input:** xrn_matrix $\rightarrow$ The decompressed xoron matrix pointer. \
> **input:** monomial_key $\rightarrow$ The xoron monomial key used to encrypt the byte stream. \
> **inout:** settings $\rightarrow$ The run time settings. 


[comment]: <> ( docautocomplete xrn_encrypt_symmetric_bytes )


### xrn_decrypt_symmetric_wrapper

**Description:**

The **xrn_decrypt_symmetric_wrapper** is used to decrypt the file with a monomial key.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_decrypt_symmetric_wrapper ( 
     FILE * input_file_fpr,
     FILE * xrn_matrix_fpr,
     FILE * monomial_key_fpr,
     FILE * decrypted_file_fpw,
     xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **input:** input_file_fpr $\rightarrow$ The input encrypted text file pointer. \
> **input:** xrn_matrix_fpr $\rightarrow$ The decompressed xoron matrix file pointer. \
> **input:** monomial_key_fpr $\rightarrow$ The monomial key file pointer. \
> **output:** decrypted_file_fpw $\rightarrow$The decrypted text file pointer. \
> **inout:** settings $\rightarrow$ The run time settings. 


[comment]: <> ( docautocomplete xrn_decrypt_symmetric_wrapper )


### xrn_decrypt_symmetric

**Description:**

The **xrn_decrypt_symmetric** is used to decrypt the file with a monomial key.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_decrypt_symmetric (
     FILE * input_file_fpr,
     xrn_matrix_t * xrn_matrix,
     xmonomial_key_t monomial_key,
     FILE * decrypted_file_fpw,
     xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **input:** input_file_fpr $\rightarrow$ The input encrypted text file pointer. \
> **input:** xrn_matrix $\rightarrow$ The xoron matrix pointer. \
> **input:** monomial_key $\rightarrow$ The monomial key. \
> **output:** decrypted_file_fpw $\rightarrow$The decrypted text file pointer. \
> **inout:** settings $\rightarrow$ The run time settings. 

[comment]: <> ( docautocomplete xrn_decrypt_symmetric )


### xrn_decrypt_symmetric_bytes_wrapper

**Description:**

The **xrn_decrypt_symmetric_bytes_wrapper** is used to decrypt the stream of bytes with a monomial key.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_decrypt_symmetric_bytes_wrapper ( 
     uint8_t * in_bytes,
     uint64_t in_length,
     uint8_t * out_bytes,
     uint64_t out_length,
     uint64_t * num_decoded_bytes,
     FILE * xrn_matrix_fpr,
     FILE * monomial_key_fpr,
     xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **input:** in_bytes $\rightarrow$ The input plain text byte stream. \
> **input:** in_length $\rightarrow$ The length of the input bytes. \
> **output:** out_bytes $\rightarrow$ The output decrypted byte stream. \
> **input:** out_length $\rightarrow$ The length of the output bytes stream. \
> **output:** num_decoded_bytes $\rightarrow$ The number of decrypted bytes. \
> **input:** xrn_matrix_fpr $\rightarrow$ The decompressed xoron matrix file pointer. \
> **input:** monomial_key_fpr $\rightarrow$ The xoron monomial key file pointer used to encrypt the byte stream. \
> **inout:** settings $\rightarrow$ The run time settings. 


[comment]: <> ( docautocomplete xrn_decrypt_symmetric_bytes_wrapper )


### xrn_decrypt_symmetric_bytes

**Description:**

The **xrn_decrypt_symmetric_bytes** is used to decrypt the stream of bytes with a monomial key.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_decrypt_symmetric_bytes ( 
     uint8_t * in_bytes,
     uint64_t in_length,
     uint8_t * out_bytes,
     uint64_t out_length,
     uint64_t * num_decoded_bytes,
     xrn_matrix_t * xrn_matrix,
     xmonomial_key_t monomial_key,
     xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **input:** in_bytes $\rightarrow$ The input plain text byte stream. \
> **input:** in_length $\rightarrow$ The length of the input bytes. \
> **output:** out_bytes $\rightarrow$ The output encrypted byte stream. \
> **input:** out_length $\rightarrow$ The length of the output bytes stream. \
> **output:** num_decoded_bytes $\rightarrow$ The number of decrypted bytes. \
> **input:** xrn_matrix $\rightarrow$ The decompressed xoron matrix pointer. \
> **input:** monomial_key $\rightarrow$ The xoron monomial key used to encrypt the byte stream. \
> **inout:** settings $\rightarrow$ The run time settings. 


[comment]: <> ( docautocomplete xrn_decrypt_symmetric_bytes )



## Asymmetric Stream Encryption 

### xrn_encrypt_asymmetric_wrapper

**Description:**

The **xrn_encrypt_asymmetric_wrapper** is used to encrypt the entire file with a binomial key.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_encrypt_asymmetric_wrapper ( 
     FILE * input_file_fpr,
     FILE * xrn_matrix_fpr,
     FILE * binomial_key_fpr,
     FILE * encrypted_file_fpw,
     xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **input:** input_file_fpr $\rightarrow$ The plain text input file pointer. \
> **input:** xrn_matrix_fpr $\rightarrow$ The decompressed xoron matrix file pointer. \
> **input:** binomial_key_fpr $\rightarrow$ The binomial key file pointer. \
> **output:** encrypted_file_fpw $\rightarrow$ The encrypted file pointer. \
> **inout:** settings $\rightarrow$ The run time settings. 

[comment]: <> ( docautocomplete xrn_encrypt_asymmetric_wrapper )



### xrn_encrypt_asymmetric

**Description:**

The **xrn_encrypt_asymmetric_wrapper** is used to encrypt the entire file with a binomial key.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_encrypt_asymmetric ( 
     FILE * input_file_fpr,
     xrn_matrix_t * xrn_matrix,
     xbinomial_key_t binomial_key,
     FILE * encrypted_file_fpw,
     xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **input:** input_file_fpr $\rightarrow$ The plain text input file pointer. \
> **input:** xrn_matrix $\rightarrow$ The decompressed xoron matrix pointer. \
> **input:** binomial_key $\rightarrow$ The binomial key used to encrypt the input file. \
> **output:** encrypted_file_fpw $\rightarrow$ The encrypted text file pointer. \
> **inout:** settings $\rightarrow$ The run time settings. 

[comment]: <> ( docautocomplete xrn_encrypt_asymmetric )


### xrn_encrypt_asymmetric_bytes

**Description:**

The **xrn_encrypt_asymmetric_bytes** is used to encrypt the entire stream of bytes with a binomial key.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_encrypt_asymmetric_bytes ( 
     uint8_t * in_bytes,
     uint64_t in_length,
     uint8_t * out_bytes,
     uint64_t out_length,
     uint64_t * num_encoded_bytes,
     xrn_matrix_t * xrn_matrix,
     xbinomial_key_t binomial_key,
     xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **input:** in_bytes $\rightarrow$ The input plain text byte stream. \
> **input:** in_length $\rightarrow$ The length of the input bytes. \
> **output:** out_bytes $\rightarrow$ The output encrypted byte stream. \
> **input:** out_length $\rightarrow$ The length of the output bytes stream. \
> **output:** num_encoded_bytes $\rightarrow$ The number of encrypted bytes. \
> **input:** xrn_matrix $\rightarrow$ The decompressed xoron matrix pointer. \
> **input:** binomial_key $\rightarrow$ The xoron binomial key used to encrypt the byte stream. \
> **inout:** settings $\rightarrow$ The run time settings. 


[comment]: <> ( docautocomplete xrn_encrypt_asymmetric_bytes )



### xrn_encrypt_asymmetric_bytes_wrapper

**Description:**

The **xrn_encrypt_asymmetric_bytes_wrapper** is used to encrypt the entire stream of bytes with a binomial key.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_encrypt_asymmetric_bytes_wrapper ( 
     uint8_t * in_bytes,
     uint64_t in_length,
     uint8_t * out_bytes,
     uint64_t out_length,
     uint64_t * num_encoded_bytes,
     FILE * xrn_matrix_fpr,
     FILE * binomial_key_fpr,
     xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **input:** in_bytes $\rightarrow$ The input plain text byte stream. \
> **input:** in_length $\rightarrow$ The length of the input bytes. \
> **output:** out_bytes $\rightarrow$ The output encrypted byte stream. \
> **input:** out_length $\rightarrow$ The length of the output bytes stream. \
> **output:** num_encoded_bytes $\rightarrow$ The number of encrypted bytes. \
> **input:** xrn_matrix_fpr $\rightarrow$ The decompressed xoron matrix file pointer. \
> **input:** binomial_key_fpr $\rightarrow$ The xoron binomial key file pointer used to encrypt the byte stream. \
> **inout:** settings $\rightarrow$ The run time settings. 


[comment]: <> ( docautocomplete xrn_encrypt_asymmetric_bytes_wrapper )


### xrn_decrypt_asymmetric_wrapper

**Description:**

The **xrn_decrypt_asymmetric_wrapper** is used to decrypt the entire file with a monomial key.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_decrypt_asymmetric_wrapper ( 
     FILE * input_file_fpr,
     FILE * xrn_matrix_fpr,
     FILE * monomial_key_fpr,
     FILE * decrypted_file_fpw,
     xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **input:** input_file_fpr $\rightarrow$ The input encrypted text file pointer. \
> **input:** xrn_matrix_fpr $\rightarrow$ The decompressed xoron matrix file pointer. \
> **input:** monomial_key_fpr $\rightarrow$ The monomial key file pointer. \
> **output:** decrypted_file_fpw $\rightarrow$ The decrypted file. \
> **inout:** settings $\rightarrow$ The run time settings. 


[comment]: <> ( docautocomplete xrn_decrypt_asymmetric_wrapper )


### xrn_decrypt_asymmetric

**Description:**

The **xrn_decrypt_asymmetric** is used to decrypt the entire file with a monomial key.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_decrypt_asymmetric ( 
     FILE * input_file_fpr,
     xrn_matrix_t * xrn_matrix,
     xmonomial_key_t monomial_key,
     FILE * decrypted_file_fpw,
     xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **input:** input_file_fpr $\rightarrow$ The input encrypted text file pointer. \
> **input:** xrn_matrix $\rightarrow$ The xoron matrix pointer. \
> **input:** monomial_key $\rightarrow$ The monomial key. \
> **output:** decrypted_file_fpw $\rightarrow$ The decrypted text file pointer. \
> **inout:** settings $\rightarrow$ The run time settings. 

[comment]: <> ( docautocomplete xrn_decrypt_asymmetric )



### xrn_decrypt_asymmetric_bytes_wrapper

**Description:**

The **xrn_decrypt_asymmetric_bytes_wrapper** is used to decrypt the entire stream of bytes with a monomial key.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_decrypt_asymmetric_bytes_wrapper ( 
     uint8_t * in_bytes,
     uint64_t in_length,
     uint8_t * out_bytes,
     uint64_t out_length,
     uint64_t * num_decoded_bytes,
     FILE * xrn_matrix_fpr,
     FILE * monomial_key_fpr,
     xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **input:** in_bytes $\rightarrow$ The input plain text byte stream. \
> **input:** in_length $\rightarrow$ The length of the input bytes. \
> **output:** out_bytes $\rightarrow$ The output decrypted byte stream. \
> **input:** out_length $\rightarrow$ The length of the output bytes stream. \
> **output:** num_decoded_bytes $\rightarrow$ The number of deccrypted bytes. \
> **input:** xrn_matrix_fpr $\rightarrow$ The decompressed xoron matrix file pointer. \
> **input:** monomial_key_fpr $\rightarrow$ The xoron monomial key file pointer used to encrypt the byte stream. \
> **inout:** settings $\rightarrow$ The run time settings. 


[comment]: <> ( docautocomplete xrn_decrypt_asymmetric_bytes_wrapper )


### xrn_decrypt_asymmetric_bytes

**Description:**

The **xrn_decrypt_asymmetric_bytes** is used to decrypt the entire stream of bytes with a monomial key.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_decrypt_asymmetric_bytes ( 
     uint8_t * in_bytes,
     uint64_t in_length,
     uint8_t * out_bytes,
     uint64_t out_length,
     uint64_t * num_decoded_bytes,
     xrn_matrix_t * xrn_matrix,
     xmonomial_key_t monomial_key,
     xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **input:** in_bytes $\rightarrow$ The input plain text byte stream. \
> **input:** in_length $\rightarrow$ The length of the input bytes. \
> **output:** out_bytes $\rightarrow$ The output encrypted byte stream. \
> **input:** out_length $\rightarrow$ The length of the output bytes stream. \
> **output:** num_decoded_bytes $\rightarrow$ The number of decrypted bytes. \
> **input:** xrn_matrix $\rightarrow$ The decompressed xoron matrix pointer. \
> **input:** monomial_key $\rightarrow$ The xoron monomial key used to encrypt the byte stream. \
> **inout:** settings $\rightarrow$ The run time settings. 


[comment]: <> ( docautocomplete xrn_decrypt_asymmetric_bytes )



## Split and Join

### xrn_split_wrapper

**Description:**

The **xrn_split_wrapper** is used to split the file into a bigger challenge file and a smaller solution file.
The two files taken on their own are encrypted, and therefore do not give any information on the plain text file.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_split_wrapper ( 
     FILE * input_file_fpr,
     FILE * output_file_challenge_fpw,
     FILE * output_file_solution_fpw,
     xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **input:** input_file_fpr $\rightarrow$ The plain text input file pointer. \
> **output:** output_file_challenge_fpw $\rightarrow$The encrypted challenge file pointer. \
> **output:** output_file_solution_fpw $\rightarrow$ The encrypted solution file pointer. \
> **inout:** settings $\rightarrow$ The run time settings. 

[comment]: <> ( docautocomplete xrn_split_wrapper )



### xrn_split_stream

**Description:**

The **xrn_split_stream** is used to split the file into a bigger challenge file and a smaller solution file.
The two files taken on their own are encrypted, and therefore do not give any information on the plain text file.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_split_stream ( 
     FILE * input_file_fpr,
     FILE * output_file_challenge_fpw,
     FILE * output_file_solution_fpw,
     xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **input:** input_file_fpr $\rightarrow$ The plain text input file pointer. \
> **output:** output_file_challenge_fpw $\rightarrow$The encrypted challenge file pointer. \
> **output:** output_file_solution_fpw $\rightarrow$ The encrypted solution file pointer. \
> **inout:** settings $\rightarrow$ The run time settings. 

[comment]: <> ( docautocomplete xrn_split_stream )


### xrn_split_bytes_wrapper

**Description:**

The **xrn_split_block_bytes_wrapper** is used to split the byte stream into a bigger challenge byte stream and a smaller solution byte stream.
The two byte streams taken on their own are encrypted, and therefore do not give any information on the plain text byte stream.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_split_bytes_wrapper ( 
     uint8_t * in_bytes,
     uint64_t in_length,
     uint8_t * out_bytes_challenge,
     uint64_t out_length_challenge,
     uint64_t * num_encoded_bytes_challenge,
     uint8_t * out_bytes_solution,
     uint64_t out_length_solution,
     uint64_t * num_encoded_bytes_solution,
     xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **input:** in_bytes $\rightarrow$ The input plain text byte stream. \
> **input:** in_length $\rightarrow$ The length of the input bytes. \
> **output:** out_bytes_challenge $\rightarrow$ The output encrypted challenge byte stream. \
> **input:** out_length_challenge $\rightarrow$ The length of the challenge bytes stream. \
> **output:** num_encoded_bytes_challenge $\rightarrow$ The number of encoded bytes in the challenge byte stream. \
> **output:** out_bytes_solution $\rightarrow$ The output encrypted solution byte stream. \
> **input:** out_length_solution $\rightarrow$ The length of the solution bytes stream. \
> **output:** num_encoded_bytes_solution $\rightarrow$ The number of encoded bytes in the solution byte stream. \
> **inout:** settings $\rightarrow$ The run time settings. 


[comment]: <> ( docautocomplete xrn_split_bytes_wrapper )



### xrn_split_bytes

**Description:**

The **xrn_split_bytes** is used to split the byte stream into a bigger challenge byte stream and a smaller solution byte stream.
The two byte streams taken on their own are encrypted, and therefore do not give any information on the plain text byte stream.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_split_bytes ( 
     uint8_t * in_bytes,
     uint64_t in_length,
     uint8_t * out_bytes_challenge,
     uint64_t out_length_challenge,
     uint64_t * num_encoded_bytes_challenge,
     uint8_t * out_bytes_solution,
     uint64_t out_length_solution,
     uint64_t * num_encoded_bytes_solution,
     xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **input:** in_bytes $\rightarrow$ The input plain text byte stream. \
> **input:** in_length $\rightarrow$ The length of the input bytes. \
> **output:** out_bytes_challenge $\rightarrow$ The output encrypted challenge byte stream. \
> **input:** out_length_challenge $\rightarrow$ The length of the challenge bytes stream. \
> **output:** num_encoded_bytes_challenge $\rightarrow$ The number of encoded bytes in the challenge byte stream. \
> **output:** out_bytes_solution $\rightarrow$ The output encrypted solution byte stream. \
> **input:** out_length_solution $\rightarrow$ The length of the solution bytes stream. \
> **output:** num_encoded_bytes_solution $\rightarrow$ The number of encoded bytes in the solution byte stream. \
> **inout:** settings $\rightarrow$ The run time settings. 


[comment]: <> ( docautocomplete xrn_split_bytes )




### xrn_join_wrapper

**Description:**

The **xrn_join_wrapper** is used to join the challenge and solution files into a plain text file.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_join_wrapper (
     FILE * input_file_challenge_fpr,
     FILE * input_file_solution_fpr,
     FILE * output_file_join_fpw,
     xrn_crypto_extra_settings_t settings
); 
```

**Arguments description:**

> **input:** input_file_challenge_fpr $\rightarrow$ The input encrypted challenge text file pointer. \
> **input:** input_file_solution_fpr $\rightarrow$ The input encrypted solution text file pointer. \
> **output:** output_file_join_fpw $\rightarrow$ The decrypted file. \
> **inout:** settings $\rightarrow$ The run time settings. 


[comment]: <> ( docautocomplete xrn_join_wrapper )



### xrn_join_stream

**Description:**

The **xrn_join_stream** is used to join the challenge and solution files into a plain text file.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_join_stream (
     FILE * input_file_challenge_fpr,
     FILE * input_file_solution_fpr,
     FILE * output_file_join_fpw,
     xrn_crypto_extra_settings_t settings
); 
```

**Arguments description:**

> **input:** input_file_challenge_fpr $\rightarrow$ The input encrypted challenge text file pointer. \
> **input:** input_file_solution_fpr $\rightarrow$ The input encrypted solution text file pointer. \
> **output:** output_file_join_fpw $\rightarrow$ The decrypted text file pointer. \
> **inout:** settings $\rightarrow$ The run time settings. 

[comment]: <> ( docautocomplete xrn_join_stream )



### xrn_join_bytes_wrapper

**Description:**

The **xrn_join_bytes_wrapper** is used to join the challenge and solution byte streams into a plain text byte stream.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_join_bytes_wrapper ( 
     uint8_t * in_bytes_challenge,
     uint64_t in_length_challenge,
     uint8_t * in_bytes_solution,
     uint64_t in_length_solution,
     uint8_t * out_bytes,
     uint64_t out_length,
     uint64_t * num_decoded_bytes,
     xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **input:** in_bytes_challenge $\rightarrow$ The input challenge byte stream. \
> **input:** in_length_challenge $\rightarrow$ The length of the input challenge byte stream. \
> **input:** in_bytes_solution $\rightarrow$ The input solution byte stream. \
> **input:** in_length_solution $\rightarrow$ The length of the input solution byte stream. \
> **output:** out_bytes $\rightarrow$ The output encrypted byte stream. \
> **input:** out_length $\rightarrow$ The length of the output bytes stream. \
> **output:** num_decoded_bytes $\rightarrow$ The number of decrypted bytes. \
> **inout:** settings $\rightarrow$ The run time settings. 


[comment]: <> ( docautocomplete xrn_join_bytes_wrapper )



### xrn_join_bytes

**Description:**

The **xrn_join_bytes** is used to join the challenge and solution byte streams into a plain text byte stream.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_join_bytes ( 
     uint8_t * in_bytes_challenge,
     uint64_t in_length_challenge,
     uint8_t * in_bytes_solution,
     uint64_t in_length_solution,
     uint8_t * out_bytes,
     uint64_t out_length,
     uint64_t * num_decoded_bytes,
     xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **input:** in_bytes_challenge $\rightarrow$ The input challenge byte stream. \
> **input:** in_length_challenge $\rightarrow$ The length of the input challenge byte stream. \
> **input:** in_bytes_solution $\rightarrow$ The input solution byte stream. \
> **input:** in_length_solution $\rightarrow$ The length of the input solution byte stream. \
> **output:** out_bytes $\rightarrow$ The output encrypted byte stream. \
> **input:** out_length $\rightarrow$ The length of the output bytes stream. \
> **output:** num_decoded_bytes $\rightarrow$ The number of decrypted bytes. \
> **inout:** settings $\rightarrow$ The run time settings. 


[comment]: <> ( docautocomplete xrn_join_bytes )


## Hash

### xrn_make_hash_wrapper

**Description:**

The **xrn_make_hash_wrapper** is used to generate a hash given an input file.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_make_hash_wrapper ( 
     FILE * input_file_fpr,
     FILE * xrn_matrix_fpr,
     FILE * hash_fpw,
     xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **input:** input_file_fpr $\rightarrow$ The input file pointer. \
> **input:** xrn_matrix_fpr $\rightarrow$ The decompressed matrix file pointer. \
> **output:** hash_fpw $\rightarrow$ The output hash file pointer. \
> **inout:** settings $\rightarrow$ The run time settings. 


[comment]: <> ( docautocomplete xrn_make_hash_wrapper )


### xrn_make_hash

**Description:**

The **xrn_make_hash** is used to generate a hash given an input file.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_make_hash ( 
     FILE * input_file_fpr,
     xrn_matrix_t * xrn_matrix,
     xhash_t * hash,
     xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **input:** input_file_fpr $\rightarrow$ The input file pointer. \
> **input:** xrn_matrix $\rightarrow$ The decompressed xoron matrix pointer. \
> **output:** hash $\rightarrow$ The hash pointer. \
> **inout:** settings $\rightarrow$ The run time settings. 


[comment]: <> ( docautocomplete xrn_make_hash )


### xrn_make_hash_bytes_wrapper

**Description:**

The **xrn_make_hash_bytes_wrapper** is used to generate a hash given an input stream of bytes.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_make_hash_bytes_wrapper ( 
     uint8_t * in_bytes,
     uint64_t in_length,
     FILE * xrn_matrix_fpr,
     FILE * hash_fpw,
     xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **input:** in_bytes $\rightarrow$ The input stream of bytes. \
> **input:** in_length $\rightarrow$ The length of the input stream of bytes. \
> **input:** xrn_matrix_fpr $\rightarrow$ The decompressed xoron matrix file pointer. \
> **output:** hash_fpw $\rightarrow$ The hash file pointer. \
> **inout:** settings $\rightarrow$ The run time settings. 


[comment]: <> ( docautocomplete xrn_make_hash_bytes_wrapper )


### xrn_make_hash_bytes

**Description:**

The **xrn_make_hash_bytes** is used to generate a hash given an input stream of bytes.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_make_hash_bytes ( 
     uint8_t * in_bytes,
     uint64_t in_length,
     xrn_matrix_t * xrn_matrix,
     xhash_t * hash,
     xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **input:** in_bytes $\rightarrow$ The input stream of bytes. \
> **input:** in_length $\rightarrow$ The length of the input stream of bytes. \
> **input:** xrn_matrix $\rightarrow$ The decompressed xoron matrix pointer. \
> **output:** hash $\rightarrow$ The hash pointer. \
> **inout:** settings $\rightarrow$ The run time settings. 


[comment]: <> ( docautocomplete xrn_make_hash_bytes )



### xrn_check_hash_wrapper

**Description:**

The **xrn_check_hash_wrapper** is used to compare a hash with a hash computed with a given file.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_check_hash_wrapper ( 
     FILE * input_file_fpr,
     FILE * input_hash_fpr,
     FILE * xrn_matrix_fpr,
     xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **input:** input_file_fpr $\rightarrow$ The input file pointer. \
> **input:** input_hash_fpr $\rightarrow$ The input hash file pointer. \
> **input:** xrn_matrix_fpr $\rightarrow$ The decompressed matrix file pointer. \
> **inout:** settings $\rightarrow$ The run time settings. 


[comment]: <> ( docautocomplete xrn_check_hash_wrapper )


### xrn_check_hash

**Description:**

The **xrn_check_hash** is used to compare a hash with a hash computed with a given file.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_check_hash ( 
     FILE * input_file_fpr,
     xhash_t hash,
     xrn_matrix_t * xrn_matrix,
     xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **input:** input_file_fpr $\rightarrow$ The input file pointer. \
> **input:** hash $\rightarrow$ The input hash to be compared. \
> **input:** xrn_matrix $\rightarrow$ The decompressed xoron matrix pointer. \
> **inout:** settings $\rightarrow$ The run time settings. 


[comment]: <> ( docautocomplete xrn_check_hash )


### xrn_check_hash_bytes_wrapper

**Description:**

The **xrn_check_hash_bytes_wrapper** is used to compare a hash with a hash computed with an input stream of bytes.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_check_hash_bytes_wrapper ( 
     uint8_t * in_bytes,
     uint64_t in_length,
     FILE * input_hash_fpr,
     FILE * xrn_matrix_fpr,
     xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **input:** in_bytes $\rightarrow$ The input stream of bytes. \
> **input:** in_length $\rightarrow$ The length of the input stream of bytes. \
> **input:** input_hash_fpr $\rightarrow$ The input hash file pointer. \
> **input:** xrn_matrix_fpr $\rightarrow$ The decompressed xoron matrix file pointer. \
> **inout:** settings $\rightarrow$ The run time settings. 


[comment]: <> ( docautocomplete xrn_check_hash_bytes_wrapper )


### xrn_check_hash_bytes

**Description:**

The **xrn_check_hash_bytes** is used to compare a hash with a hash computed with an input stream of bytes.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_check_hash_bytes ( 
     uint8_t * in_bytes,
     uint64_t in_length,
     xhash_t hash,
     xrn_matrix_t * xrn_matrix,
     xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **input:** in_bytes $\rightarrow$ The input stream of bytes. \
> **input:** in_length $\rightarrow$ The length of the input stream of bytes. \
> **input:** hash $\rightarrow$ The hash to be compared. \
> **input:** xrn_matrix $\rightarrow$ The decompressed xoron matrix pointer. \
> **inout:** settings $\rightarrow$ The run time settings. 


[comment]: <> ( docautocomplete xrn_check_hash_bytes )




## Symmetric Signature

### xrn_make_signature_symmetric_wrapper

**Description:**

The **xrn_make_signature_symmetric_wrapper** is used to generate a signature from a file given a monomial key.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_make_signature_symmetric_wrapper ( 
     FILE * input_file_fpr,
     FILE * monomial_key_fpr,
     FILE * xrn_matrix_fpr,
     FILE * signature_fpw,
     xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **input:** input_file_fpr $\rightarrow$ The input stream of bytes. \
> **input:** monomial_key_fpr $\rightarrow$ The monomial key file pointer. \
> **input:** xrn_matrix_fpr $\rightarrow$ The decompressed xoron matrix file pointer. \
> **output:** signature_fpw $\rightarrow$ The signature file pointer. \
> **inout:** settings $\rightarrow$ The run time settings. 


[comment]: <> ( docautocomplete xrn_make_signature_symmetric_wrapper )



### xrn_make_signature_symmetric

**Description:**

The **xrn_make_signature_symmetric** is used to generate a signature from a file given a monomial key.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_make_signature_symmetric  ( 
     FILE * input_file_fpr,
     xmonomial_key_t monomial_key,
     xrn_matrix_t * xrn_matrix,
     xsignature_sym_t * signature,
     xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **input:** input_file_fpr $\rightarrow$ The input file pointer. \
> **input:** monomial_key $\rightarrow$ The monomial key. \
> **input:** xrn_matrix $\rightarrow$ The decompressed xoron matrix pointer. \
> **output:** signature $\rightarrow$ The signature pointer. \
> **inout:** settings $\rightarrow$ The run time settings. 


[comment]: <> ( docautocomplete xrn_make_signature_symmetric  )



### xrn_make_signature_symmetric_bytes_wrapper

**Description:**

The **xrn_make_signature_symmetric_bytes_wrapper** is used to generate a signature from a stream of bytes given a monomial key.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_make_signature_symmetric_bytes_wrapper ( 
     uint8_t * in_bytes,
     uint64_t in_length,
     FILE * monomial_key_fpr,
     FILE * xrn_matrix_fpr,
     FILE * signature_fpw,
     xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **input:** in_bytes $\rightarrow$ The input stream of bytes. \
> **input:** in_length $\rightarrow$ The length of the input stream of bytes. \
> **input:** monomial_key_fpr $\rightarrow$ The monomial key file pointer. \
> **input:** xrn_matrix_fpr $\rightarrow$ The decompressed xoron matrix file pointer. \
> **output:** signature_fpw $\rightarrow$ The signature file pointer. \
> **inout:** settings $\rightarrow$ The run time settings. 


[comment]: <> ( docautocomplete xrn_make_signature_symmetric_bytes_wrapper )



### xrn_make_signature_symmetric_bytes

**Description:**

The **xrn_make_signature_symmetric_bytes** is used to generate a signature from a stream of bytes given a monomial key.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_make_signature_symmetric_bytes ( 
     uint8_t * in_bytes,
     uint64_t in_length,
     xmonomial_key_t monomial_key,
     xrn_matrix_t * xrn_matrix,
     xsignature_sym_t * signature,
     xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **input:** in_bytes $\rightarrow$ The input stream of bytes. \
> **input:** in_length $\rightarrow$ The length of the input stream of bytes. \
> **input:** monomial_key $\rightarrow$ The monomial key. \
> **input:** xrn_matrix $\rightarrow$ The decompressed xoron matrix pointer. \
> **output:** signature $\rightarrow$ The signature pointer. \
> **inout:** settings $\rightarrow$ The run time settings. 


[comment]: <> ( docautocomplete xrn_make_signature_symmetric_bytes )


### xrn_check_signature_symmetric_wrapper

**Description:**

The **xrn_check_signature_symmetric_wrapper** is used to verify a signature from a file given a monomial key.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_check_signature_symmetric_wrapper ( 
     FILE * input_file_fpr,
     FILE * monomial_key_fpr,
     FILE * xrn_matrix_fpr,
     FILE * signature_fpr,
     xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **input:** input_file_fpr $\rightarrow$ The input stream of bytes. \
> **input:** monomial_key_fpr $\rightarrow$ The monomial key file pointer. \
> **input:** xrn_matrix_fpr $\rightarrow$ The decompressed xoron matrix file pointer. \
> **input:** signature_fpr $\rightarrow$ The signature file pointer. \
> **inout:** settings $\rightarrow$ The run time settings. 


[comment]: <> ( docautocomplete xrn_check_signature_symmetric_wrapper )



### xrn_check_signature_symmetric

**Description:**

The **xrn_check_signature_symmetric** is used to verify a signature from a file given a monomial key.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_check_signature_symmetric ( 
     FILE * input_file_fpr,
     xmonomial_key_t monomial_key,
     xrn_matrix_t * xrn_matrix,
     xsignature_sym_t signature,
     xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **input:** input_file_fpr $\rightarrow$ The input stream of bytes. \
> **input:** monomial_key $\rightarrow$ The monomial key. \
> **input:** xrn_matrix $\rightarrow$ The decompressed xoron matrix pointer. \
> **input:** signature $\rightarrow$ The signature data structure. \
> **inout:** settings $\rightarrow$ The run time settings. 

[comment]: <> ( docautocomplete xrn_check_signature_symmetric )



### xrn_check_signature_symmetric_bytes_wrapper

**Description:**

The **xrn_check_signature_symmetric_bytes_wrapper** is used to verify a signature from a stream of bytes given a monomial key.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_check_signature_symmetric_bytes_wrapper ( 
     uint8_t * in_bytes,
     uint64_t in_length,
     FILE * monomial_key_fpr,
     FILE * xrn_matrix_fpr,
     FILE * signature_fpr,
     xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **input:** in_bytes $\rightarrow$ The input stream of bytes. \
> **input:** in_length $\rightarrow$ The length of the input stream of bytes. \
> **input:** monomial_key_fpr $\rightarrow$ The monomial key file pointer. \
> **input:** xrn_matrix_fpr $\rightarrow$ The decompressed xoron matrix file pointer. \
> **input:** signature_fpr $\rightarrow$ The signature file pointer. \
> **inout:** settings $\rightarrow$ The run time settings. 


[comment]: <> ( docautocomplete xrn_check_signature_symmetric_bytes_wrapper )



### xrn_check_signature_symmetric_bytes

**Description:**

The **xrn_check_signature_symmetric_bytes** is used to verify a signature from a stream of bytes given a monomial key.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_check_signature_symmetric_bytes ( 
     uint8_t * in_bytes,
     uint64_t in_length,
     xmonomial_key_t monomial_key,
     xrn_matrix_t * xrn_matrix,
     xsignature_sym_t signature,
     xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **input:** in_bytes $\rightarrow$ The input stream of bytes. \
> **input:** in_length $\rightarrow$ The length of the input stream of bytes. \
> **input:** monomial_key $\rightarrow$ The monomial key. \
> **input:** xrn_matrix $\rightarrow$ The decompressed xoron matrix pointer. \
> **output:** signature $\rightarrow$ The signature data structure. \
> **inout:** settings $\rightarrow$ The run time settings. 


[comment]: <> ( docautocomplete xrn_check_signature_symmetric_bytes )



## Asymmetric signature

### xrn_make_signature_asymmetric_wrapper

**Description:**

The **xrn_make_signature_asymmetric_wrapper** is used to generate a signature from a file given a binomial key.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_make_signature_asymmetric_wrapper ( 
     FILE * input_file_fpr,
     FILE * monomial_key_fpr,
     FILE * binomial_key_fpr,
     FILE * xrn_matrix_fpr,
     FILE * signature_fpw,
     xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **input:** input_file_fpr $\rightarrow$ The input stream of bytes. \
> **input:** monomial_key_fpr $\rightarrow$ The monomial key file pointer. \
> **input:** binomial_key_fpr $\rightarrow$ The binomial key file pointer. \
> **input:** xrn_matrix_fpr $\rightarrow$ The decompressed xoron matrix file pointer. \
> **output:** signature_fpw $\rightarrow$ The signature file pointer. \
> **inout:** settings $\rightarrow$ The run time settings. 


[comment]: <> ( docautocomplete xrn_make_signature_asymmetric_wrapper )



### xrn_make_signature_asymmetric

**Description:**

The **xrn_make_signature_asymmetric** is used to generate a signature from a file given a binomial key.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_make_signature_asymmetric (
     FILE * input_file_fpr,
     xmonomial_key_t monomial_key,
     xbinomial_key_t binomial_key,
     xrn_matrix_t * xrn_matrix,
     xsignature_asy_t * signature,
     xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **input:** input_file_fpr $\rightarrow$ The input file pointer. \
> **input:** monomial_key $\rightarrow$ The monomial key. \
> **input:** binomial_key $\rightarrow$ The binomial key. \
> **input:** xrn_matrix $\rightarrow$ The decompressed xoron matrix pointer. \
> **output:** signature $\rightarrow$ The signature pointer. \
> **inout:** settings $\rightarrow$ The run time settings. 


[comment]: <> ( docautocomplete xrn_make_signature_asymmetric )



### xrn_make_signature_asymmetric_bytes_wrapper

**Description:**

The **xrn_make_signature_asymmetric_bytes_wrapper** is used to generate a signature from a stream of bytes given a binomial key.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_make_signature_asymmetric_bytes_wrapper ( 
     uint8_t * in_bytes,
     uint64_t in_length,
     FILE * monomial_key_fpr,
     FILE * binomial_key_fpr,
     FILE * xrn_matrix_fpr,
     FILE * signature_fpw,
     xrn_crypto_extra_settings_t settings
);
```


**Arguments description:**

> **input:** in_bytes $\rightarrow$ The input stream of bytes. \
> **input:** in_length $\rightarrow$ The length of the input stream of bytes. \
> **input:** monomial_key_fpr $\rightarrow$ The monomial key file pointer. \
> **input:** binomial_key_fpr $\rightarrow$ The binomial key file pointer. \
> **input:** xrn_matrix_fpr $\rightarrow$ The decompressed xoron matrix file pointer. \
> **output:** signature_fpw $\rightarrow$ The signature file pointer. \
> **inout:** settings $\rightarrow$ The run time settings. 


[comment]: <> ( docautocomplete xrn_make_signature_asymmetric_bytes_wrapper )


### xrn_make_signature_asymmetric_bytes

**Description:**

The **xrn_make_signature_asymmetric_bytes** is used to generate a signature from a stream of bytes given a binomial key.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_make_signature_asymmetric_bytes ( 
     uint8_t * in_bytes,
     uint64_t in_length,
     xmonomial_key_t monomial_key,
     xbinomial_key_t binomial_key,
     xrn_matrix_t * xrn_matrix,
     xsignature_asy_t * signature,
     xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **input:** in_bytes $\rightarrow$ The input stream of bytes. \
> **input:** in_length $\rightarrow$ The length of the input stream of bytes. \
> **input:** binomial_key $\rightarrow$ The monomial key. \
> **input:** binomial_key $\rightarrow$ The binomial key. \
> **input:** xrn_matrix $\rightarrow$ The decompressed xoron matrix pointer. \
> **output:** signature $\rightarrow$ The signature pointer. \
> **inout:** settings $\rightarrow$ The run time settings. 


[comment]: <> ( docautocomplete xrn_make_signature_asymmetric_bytes )



### xrn_check_signature_asymmetric_wrapper

**Description:**

The **xrn_check_signature_asymmetric_wrapper** is used to verify a signature from a file given a monomial key.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_check_signature_asymmetric_wrapper ( 
     FILE * input_file_fpr,
     FILE * binomial_key_fpr,
     FILE * xrn_matrix_fpr,
     FILE * signature_fpr,
     xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **input:** input_file_fpr $\rightarrow$ The input stream of bytes. \
> **input:** binomial_key_fpr $\rightarrow$ The binomial key file pointer. \
> **input:** xrn_matrix_fpr $\rightarrow$ The decompressed xoron matrix file pointer. \
> **input:** signature_fpr $\rightarrow$ The signature file pointer. \
> **inout:** settings $\rightarrow$ The run time settings. 


[comment]: <> ( docautocomplete xrn_check_signature_asymmetric_wrapper )


### xrn_check_signature_asymmetric

**Description:**

The **xrn_check_signature_asymmetric** is used to verify a signature from a file given a monomial key.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_check_signature_asymmetric ( 
     FILE * input_file_fpr,
     xbinomial_key_t binomial_key,
     xrn_matrix_t * xrn_matrix,
     xsignature_asy_t signature,
     xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **input:** input_file_fpr $\rightarrow$ The input stream of bytes. \
> **input:** binomial_key $\rightarrow$ The binomial key. \
> **input:** xrn_matrix $\rightarrow$ The decompressed xoron matrix pointer. \
> **input:** signature $\rightarrow$ The signature data structure. \
> **inout:** settings $\rightarrow$ The run time settings. 

[comment]: <> ( docautocomplete xrn_check_signature_asymmetric )



### xrn_check_signature_asymmetric_bytes_wrapper

**Description:**

The **xrn_check_signature_asymmetric_bytes_wrapper** is used to verify a signature from a stream of bytes given a monomial key.

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_check_signature_asymmetric_bytes_wrapper ( 
     uint8_t * in_bytes,
     uint64_t in_length,
     FILE * binomial_key_fpr,
     FILE * xrn_matrix_fpr,
     FILE * signature_fpr,
     xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **input:** in_bytes $\rightarrow$ The input stream of bytes. \
> **input:** in_length $\rightarrow$ The length of the input stream of bytes. \
> **input:** binomial_key_fpr $\rightarrow$ The binomial key file pointer. \
> **input:** xrn_matrix_fpr $\rightarrow$ The decompressed xoron matrix file pointer. \
> **input:** signature_fpr $\rightarrow$ The signature file pointer. \
> **inout:** settings $\rightarrow$ The run time settings. 


[comment]: <> ( docautocomplete xrn_check_signature_asymmetric_bytes_wrapper )



### xrn_check_signature_asymmetric_bytes

**Description:**

The **xrn_check_signature_asymmetric_bytes** is used to verify a signature from a stream of bytes given a monomial key.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_check_signature_asymmetric_bytes ( 
     uint8_t * in_bytes,
     uint64_t in_length,
     xbinomial_key_t binomial_key,
     xrn_matrix_t * xrn_matrix,
     xsignature_asy_t signature,
     xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **input:** in_bytes $\rightarrow$ The input stream of bytes. \
> **input:** in_length $\rightarrow$ The length of the input stream of bytes. \
> **input:** binomial_key $\rightarrow$ The monomial key. \
> **input:** xrn_matrix $\rightarrow$ The decompressed xoron matrix pointer. \
> **output:** signature $\rightarrow$ The signature data structure. \
> **inout:** settings $\rightarrow$ The run time settings. 


[comment]: <> ( docautocomplete xrn_check_signature_asymmetric_bytes )



## Ring Signatures

### xrn_make_ring_signature_wrapper

**Description:**

The **xrn_make_ring_signature_wrapper** is used to generate a ring signature from a file.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_make_ring_signature_wrapper ( 
     FILE * input_file_fpr,
     FILE ** binomial_key_decoys_fpr,
     FILE * monomial_key_fpr,
     FILE * tx_binomial_key_fpr,
     FILE * rx_binomial_key_fpr,
     FILE * xrn_matrix_fpr,
     uint16_t ndecoys,
     FILE * ring_signature_fpw,
     xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **input:** input_file_fpr $\rightarrow$ The input file. \
> **input:** binomial_key_decoys_fpr $\rightarrow$ The list of decoys file pointers used in the ring signature. \
> **input:** monomial_key_fpr $\rightarrow$ The monomial key file pointer. \
> **input:** tx_binomial_key_fpr $\rightarrow$ The transmitter binomial key file pointer, the binomial key associated with the monomial key. \
> **input:** rx_binomial_key_fpr $\rightarrow$ The receiver binomial key file pointer, the binomial key not associtad with the monomial key. \
> **input:** xrn_matrix_fpr $\rightarrow$ The decompressed xoron matrix file pointer. \
> **input:** ndecoys $\rightarrow$ The number of decoys, the size of the decoy list. \
> **output:** ring_signature_fpw $\rightarrow$ The ring signature file pointer. \
> **inout:** settings $\rightarrow$ The run time settings. 


[comment]: <> ( docautocomplete xrn_make_ring_signature_wrapper )


### xrn_make_ring_signature

**Description:**

The **xrn_make_ring_signature** is used to generate a ring signature from a file.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_make_ring_signature ( 
     FILE * input_file_fpr,
     xbinomial_key_t * binomial_key_decoys,
     xmonomial_key_t monomial_key,
     xbinomial_key_t signer_binomial_key,
     xbinomial_key_t verifier_binomial_key,
     xrn_matrix_t * xrn_matrix,
     uint16_t ndecoys,
     xring_signature_t * ring_signature,
     xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **input:** input_file_fpr $\rightarrow$ The input file. \
> **input:** binomial_key_decoys $\rightarrow$ The list of decoys used in the ring signature. \
> **input:** monomial_key $\rightarrow$ The monomial key. \
> **input:** signer_binomial_key $\rightarrow$ The signer binomial key, the binomial key associated with the monomial key. \
> **input:** verifier_binomial_key $\rightarrow$ The verifier binomial key, the binomial key not associtad with the monomial key. \
> **input:** xrn_matrix $\rightarrow$ The decompressed xoron matrix pointer. \
> **input:** ndecoys $\rightarrow$ The number of decoys, the size of the decoy list. \
> **output:** ring_signature $\rightarrow$ The signature pointer. \
> **inout:** settings $\rightarrow$ The run time settings. 

[comment]: <> ( docautocomplete xrn_make_ring_signature )

### xrn_permute_ring_signature_wrapper

**Description:**

The **xrn_permute_ring_signature_wrapper** is used to import decoys from another ring signature to an already made ring signature starting from files.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_permute_ring_signature_wrapper ( 
     FILE * signer_binomial_key_fpr,
     FILE * verifier_binomial_key_fpr,
     FILE * signer_ring_signature_fpr,
     FILE * verifier_ring_signature_fpr,
     FILE * ring_signature_fpw,
     xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **input:** signer_binomial_key_fpr $\rightarrow$ The transmitter binomial key file pointer, the binomial key associated with the monomial key. \
> **input:** verifier_binomial_key_fpr $\rightarrow$ The receiver binomial key file pointer, the binomial key not associtad with the monomial key. \
> **input:** signer_ring_signature_fpr $\rightarrow$ The ring signature file pointer. \
> **input:** verifier_ring_signature_fpr $\rightarrow$ The ring signature file pointer. \
> **output:** ring_signature_fpw $\rightarrow$ The ring signature file pointer. \
> **inout:** settings $\rightarrow$ The run time settings. 

[comment]: <> ( docautocomplete xrn_permute_ring_signature_wrapper )

### xrn_permute_ring_signature

**Description:**

The **xrn_permute_ring_signature** is used to import decoys from another ring signature to an already made ring signature.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_permute_ring_signature ( 
     xbinomial_key_t signer_binomial_key,
     xbinomial_key_t verifier_binomial_key,
     xring_signature_t signer_ring_signature,
     xring_signature_t verifier_ring_signature,
     xring_signature_t * permuted_ring_signature,
     xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **input:** signer_binomial_key $\rightarrow$ The signer binomial key, the binomial key associated with the monomial key. \
> **input:** verifier_binomial_key $\rightarrow$ The verifier binomial key, the binomial key not associtad with the monomial key. \
> **input:** signer_ring_signature $\rightarrow$ The signer ring signature. \
> **input:** verifier_ring_signature $\rightarrow$ The verifier ring signature. \
> **output:** permuted_ring_signature $\rightarrow$ The signature pointer. \
> **inout:** settings $\rightarrow$ The run time settings. 

[comment]: <> ( docautocomplete xrn_permute_ring_signature )


### xrn_make_ring_signature_bytes_wrapper

**Description:**

The **xrn_make_ring_signature_bytes_wrapper** is used to generate a ring signature from a stream of bytes.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_make_ring_signature_bytes_wrapper ( 
     uint8_t * in_bytes,
     uint64_t in_length,
     FILE ** binomial_key_decoys_fpr,
     FILE * monomial_key_fpr,
     FILE * tx_binomial_key_fpr,
     FILE * rx_binomial_key_fpr,
     FILE * xrn_matrix_fpr,
     uint16_t ndecoys,
     FILE * signature_fpw,
     xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **input:** in_bytes $\rightarrow$ The input stream of bytes. \
> **input:** in_length $\rightarrow$ The length of the input bytes. \
> **input:** binomial_key_decoys_fpr $\rightarrow$ The list of decoys file pointers used in the ring signature. \
> **input:** monomial_key_fpr $\rightarrow$ The monomial key file pointer. \
> **input:** tx_binomial_key_fpr $\rightarrow$ The transmitter binomial key file pointer, the binomial key associated with the monomial key. \
> **input:** rx_binomial_key_fpr $\rightarrow$ The receiver binomial key file pointer, the binomial key not associtad with the monomial key. \
> **input:** xrn_matrix_fpr $\rightarrow$ The decompressed xoron matrix file pointer. \
> **input:** ndecoys $\rightarrow$ The number of decoys, the size of the decoy list. \
> **output:** ring_signature_fpw $\rightarrow$ The ring signature file pointer. \
> **inout:** settings $\rightarrow$ The run time settings. 


[comment]: <> ( docautocomplete xrn_make_ring_signature_bytes_wrapper )



### xrn_make_ring_signature_bytes

**Description:**

The **xrn_make_ring_signature_bytes** is used to generate a ring signature from a stream of bytes.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_make_ring_signature_bytes ( 
     uint8_t * in_bytes,
     uint64_t in_length,
     xbinomial_key_t * binomial_key_decoys,
     xmonomial_key_t monomial_key,
     xbinomial_key_t signer_binomial_key,
     xbinomial_key_t verifier_binomial_key,
     xrn_matrix_t * xrn_matrix,
     uint16_t ndecoys,
     xring_signature_t * ring_signature,
     xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **input:** in_bytes $\rightarrow$ The input stream of bytes. \
> **input:** in_length $\rightarrow$ The length of the input bytes. \
> **input:** binomial_key_decoys $\rightarrow$ The list of decoys pointers used in the ring signature. \
> **input:** monomial_key $\rightarrow$ The monomial key pointer. \
> **input:** signer_binomial_key $\rightarrow$ The signer binomial key pointer, the binomial key associated with the monomial key. \
> **input:** verifier_binomial_key $\rightarrow$ The verifier binomial key pointer, the binomial key not associtad with the monomial key. \
> **input:** xrn_matrix $\rightarrow$ The decompressed xoron matrix pointer. \
> **input:** ndecoys $\rightarrow$ The number of decoys, the size of the decoy list. \
> **output:** ring_signature $\rightarrow$ The signature pointer. \
> **inout:** settings $\rightarrow$ The run time settings. 


[comment]: <> ( docautocomplete xrn_make_ring_signature_bytes )



### xrn_check_ring_signature_wrapper

**Description:**

The **xrn_check_ring_signature_wrapper** is used to verify a ring signature from a file.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_check_ring_signature_wrapper ( 
     FILE * input_file_fpr,
     FILE * ring_signature_fpr,
     FILE * monomial_key_fpr,
     FILE * xrn_matrix_fpr,
     FILE * tx_binomial_key_fpw,
     xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **input:** input_file_fpr $\rightarrow$ The input file. \
> **input:** ring_signature_fpr $\rightarrow$ The ring signature file pointer. \
> **input:** monomial_key_fpr $\rightarrow$ The monomial key file pointer. \
> **input:** xrn_matrix_fpr $\rightarrow$ The decompressed xoron matrix file pointer. \
> **output:** tx_binomial_key_fpw $\rightarrow$The signer binomial key file pointer. \
> **inout:** settings $\rightarrow$ The run time settings. 


[comment]: <> ( docautocomplete xrn_check_ring_signature_wrapper )



### xrn_check_ring_signature

**Description:**

The **xrn_check_ring_signature** is used to verify a ring signature from a file.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_check_ring_signature (
     FILE * input_file_fpr,
     xring_signature_t ring_signature,
     xmonomial_key_t monomial_key,
     xrn_matrix_t * xrn_matrix,
     xbinomial_key_t * signer_binomial_key,
     xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **input:** input_file_fpr $\rightarrow$ The input file. \
> **input:** ring_signature $\rightarrow$ The ring signature file pointer. \
> **input:** monomial_key $\rightarrow$ The monomial key file pointer. \
> **input:** xrn_matrix $\rightarrow$ The decompressed xoron matrix pointer. \
> **output:** signer_binomial_key $\rightarrow$The signer binomial key pointer. \
> **inout:** settings $\rightarrow$ The run time settings. 


[comment]: <> ( docautocomplete xrn_check_ring_signature )


### xrn_check_ring_signature_bytes_wrapper

**Description:**

The **xrn_check_ring_signature_bytes_wrapper** is used to verify a ring signature from a stream of bytes.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_check_ring_signature_bytes_wrapper ( 
     uint8_t * in_bytes,
     uint64_t in_length,
     FILE * ring_signature_fpr,
     FILE * monomial_key_fpr,
     FILE * xrn_matrix_fpr,
     FILE * tx_binomial_key_fpw,
     xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **input:** in_bytes $\rightarrow$ The input stream of bytes. \
> **input:** in_length $\rightarrow$ The length of the input stream of bytes. \
> **input:** ring_signature_fpr $\rightarrow$ The ring signature file pointer. \
> **input:** monomial_key_fpr $\rightarrow$ The monomial key file pointer. \
> **input:** xrn_matrix_fpr $\rightarrow$ The decompressed xoron matrix file pointer. \
> **output:** tx_binomial_key_fpw $\rightarrow$The signer binomial key file pointer. \
> **inout:** settings $\rightarrow$ The run time settings. 

[comment]: <> ( docautocomplete xrn_check_ring_signature_bytes_wrapper )



### xrn_check_ring_signature_bytes

**Description:**

The **xrn_check_ring_signature_bytes** is used to verify a ring signature from a stream of bytes.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_check_ring_signature_bytes ( 
     uint8_t * in_bytes,
     uint64_t in_length,
     xring_signature_t ring_signature,
     xmonomial_key_t monomial_key,
     xrn_matrix_t * xrn_matrix,
     xbinomial_key_t * signer_binomial_key,
     xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **input:** in_bytes $\rightarrow$ The input stream of bytes. \
> **input:** in_length $\rightarrow$ The length of the input stream of bytes. \
> **input:** ring_signature $\rightarrow$ The ring signature file pointer. \
> **input:** monomial_key $\rightarrow$ The monomial key file pointer. \
> **input:** xrn_matrix $\rightarrow$ The decompressed xoron matrix pointer. \
> **output:** signer_binomial_key $\rightarrow$The signer binomial key pointer. \
> **inout:** settings $\rightarrow$ The run time settings. 

[comment]: <> ( docautocomplete xrn_check_ring_signature_bytes )

## Symmetric Certificates

### xrn_make_certificate_symmetric_wrapper

**Description:**

The **xrn_make_certificate_symmetric_wrapper** is used to generate a certificate given a subject, monomial key of the issuer, binomial key of the subject.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_make_certificate_symmetric_wrapper ( 
     FILE * issuer_monomial_key_fpr,
     FILE * subject_monovalent_key_fpr,
     char * subject,
     FILE * xrn_matrix_fpr,
     uint64_t start_validity,
     uint64_t end_validity,
     FILE * certificate_fpw,
     xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **input:** issuer_monomial_key_fpr $\rightarrow$ The issuer monomial key file pointer. \
> **input:** subject_monovalent_key_fpr $\rightarrow$ The subject monovalent key file pointer. \
> **input:** subject $\rightarrow$ The subject in plain text. \
> **input:** xrn_matrix_fpr $\rightarrow$ The decompressed xoron matrix file pointer. \
> **input:** start_validity $\rightarrow$ The start validity of the certificate. \
> **input:** end_validity $\rightarrow$ The end validity of the certificate. \
> **output:** certificate_fpw $\rightarrow$ The cerficate file pointer. \
> **inout:** settings $\rightarrow$ The run time settings. 


[comment]: <> ( docautocomplete xrn_make_certificate_symmetric_wrapper )



### xrn_make_certificate_symmetric

**Description:**

The **xrn_make_certificate_symmetric** is used to generate a certificate given a subject, monomial key of the issuer, binomial key of the subject.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_make_certificate_symmetric (
     xmonomial_key_t hosh_monomial_key,
     xmonovalent_key_t guest_monovalent_key,
     char * guest_message,
     xrn_matrix_t * xrn_matrix,
     uint64_t start_validity,
     uint64_t end_validity,
     xcertificate_sym_t * certificate,
     xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **input:** host_monomial_key $\rightarrow$ The host monomial key. \
> **input:** guest_binomial_key $\rightarrow$ The guest binomial key. \
> **input:** guest_message $\rightarrow$ The guest message string. \
> **input:** xrn_matrix $\rightarrow$ The decompressed xoron matrix pointer. \
> **input:** start_validity $\rightarrow$ The start validity of the certificate. \
> **input:** end_validity $\rightarrow$ The end validity of the certificate. \
> **output:** certificate $\rightarrow$ The cerficate pointer. \
> **inout:** settings $\rightarrow$ The run time settings. 


[comment]: <> ( docautocomplete xrn_make_certificate_symmetric )



### xrn_check_certificate_symmetric_wrapper

**Description:**

The **xrn_check_certificate_symmetric_wrapper** is used to verify a certificate given the monomial key of the issuer.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_check_certificate_symmetric_wrapper ( 
     FILE * issuer_monomial_key_fpr,
     FILE * xrn_matrix_fpr,
     FILE * certificate_fpr,
     xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **input:** issuer_monomial_key_fpr $\rightarrow$ The issuer monomial key file pointer. \
> **input:** xrn_matrix_fpr $\rightarrow$ The decompressed xoron matrix file pointer. \
> **input:** certificate_fpr $\rightarrow$ The cerficate file pointer. \
> **inout:** settings $\rightarrow$ The run time settings. 


[comment]: <> ( docautocomplete xrn_check_certificate_symmetric_wrapper )



### xrn_check_certificate_symmetric

**Description:**

The **xrn_check_certificate_symmetric** is used to verify a certificate given the monomial key of the issuer.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_check_certificate_symmetric ( 
     xmonomial_key_t issuer_monomial_key,
     xrn_matrix_t * xrn_matrix,
     xcertificate_sym_t certificate,
     xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **input:** issuer_monomial_key $\rightarrow$ The issuer monomial key. \
> **input:** xrn_matrix $\rightarrow$ The decompressed xoron matrix pointer. \
> **input:** certificate $\rightarrow$ The cerficate. \
> **inout:** settings $\rightarrow$ The run time settings. 


[comment]: <> ( docautocomplete xrn_check_certificate_symmetric )



## Asymmetric Certificates

### xrn_make_certificate_asymmetric_wrapper

**Description:**

The **xrn_make_certificate_asymmetric_wrapper** is used to verify a certificate given the binomial and monomial key of the issuer.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_make_certificate_asymmetric_wrapper ( 
     FILE * issuer_monomial_key_fpr,
     FILE * issuer_binomial_key_fpr,
     FILE * subject_binomial_key_fpr,
     char * subject,
     FILE * xrn_matrix_fpr,
     uint64_t start_validity,
     uint64_t end_validity,
     FILE * certificate_fpw,
     xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **input:** issuer_monomial_key_fpr $\rightarrow$ The issuer monomial key file pointer. \
> **input:** issuer_binomial_key_fpr $\rightarrow$ The issuer binomial key file pointer. \
> **input:** subject_binomial_key_fpr $\rightarrow$ The subject binomial key file pointer. \
> **input:** subject $\rightarrow$ The subject in plain text. \
> **input:** xrn_matrix_fpr $\rightarrow$ The decompressed xoron matrix file pointer. \
> **input:** start_validity $\rightarrow$ The start validity of the certificate. \
> **input:** end_validity $\rightarrow$ The end validity of the certificate. \
> **output:** certificate_fpw $\rightarrow$ The cerficate file pointer. \
> **inout:** settings $\rightarrow$ The run time settings. 


[comment]: <> ( docautocomplete xrn_make_certificate_asymmetric_wrapper )



### xrn_make_certificate_asymmetric

**Description:**

The **xrn_make_certificate_asymmetric** is used to verify a certificate given the binomial and monomial key of the issuer.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_make_certificate_asymmetric (
     xmonomial_key_t host_monomial_key,
     xbinomial_key_t host_binomial_key,
     xbinomial_key_t guest_binomial_key,
     char * guest_message,
     xrn_matrix_t * xrn_matrix,
     uint64_t start_validity,
     uint64_t end_validity,
     xcertificate_asy_t * certificate,
     xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **input:** host_monomial_key $\rightarrow$ The host monomial key. \
> **input:** host_binomial_key $\rightarrow$ The host binomial key. \
> **input:** guest_binomial_key $\rightarrow$ The guest binomial key. \
> **input:** guest_message $\rightarrow$ The guest message string. \
> **input:** xrn_matrix $\rightarrow$ The decompressed xoron matrix pointer. \
> **input:** start_validity $\rightarrow$ The start validity of the certificate. \
> **input:** end_validity $\rightarrow$ The end validity of the certificate. \
> **output:** certificate $\rightarrow$ The cerficate pointer. \
> **inout:** settings $\rightarrow$ The run time settings. 


[comment]: <> ( docautocomplete xrn_make_certificate_asymmetric )




### xrn_check_certificate_asymmetric_wrapper

**Description:**

The **xrn_check_certificate_asymmetric_wrapper** is used to verify a certificate given the binomial key of the issuer.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_check_certificate_asymmetric_wrapper ( 
     FILE * issuer_binomial_key_fpr,
     FILE * xrn_matrix_fpr,
     FILE * certificate_fpr,
     xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **input:** issuer_binomial_key_fpr $\rightarrow$ The issuer binomial key file pointer. \
> **input:** xrn_matrix_fpr $\rightarrow$ The decompressed xoron matrix file pointer. \
> **input:** certificate_fpr $\rightarrow$ The cerficate file pointer. \
> **inout:** settings $\rightarrow$ The run time settings. 


[comment]: <> ( docautocomplete xrn_check_certificate_asymmetric_wrapper )


### xrn_check_certificate_asymmetric

**Description:**

The **xrn_check_certificate_asymmetric** is used to verify a certificate given the binomial key of the issuer.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_check_certificate_asymmetric (
     xbinomial_key_t issuer_binomial_key,
     xrn_matrix_t * xrn_matrix,
     xcertificate_asy_t certificate,
     xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **input:** issuer_binomial_key $\rightarrow$ The issuer binomial key. \
> **input:** xrn_matrix $\rightarrow$ The decompressed xoron matrix pointer. \
> **input:** certificate $\rightarrow$ The cerficate. \
> **inout:** settings $\rightarrow$ The run time settings. 


[comment]: <> ( docautocomplete xrn_check_certificate_asymmetric )


## Zero Knowledge Proofs

### xrn_check_monomial_proof_wrapper

**Description:**

The **xrn_check_monomial_proof_wrapper** is used to verify a zero knowledge proof, starting from a binomial key.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_check_monomial_proof_wrapper (
     FILE * binomial_key_fpr,
     FILE * xrn_matrix_fpr,
     FILE * binomial_commitment_fpr,
     FILE * monomial_response_fpr,
     FILE * monomial_proof_fpr,
     xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **input:** binomial_key_fpr $\rightarrow$ The binomial key file pointer. \
> **input:** xrn_matrix_fpr $\rightarrow$ The xoron matrix file pointer. \
> **input:** binomial_commitment_fpr $\rightarrow$ The issuer commitment file pointer. \
> **input:** monomial_response_fpr $\rightarrow$ The verifier response file pointer. \
> **input:** monomial_proof_fpr $\rightarrow$ The monomial proof file pointer. \
> **inout:** settings $\rightarrow$ The run time settings. 


[comment]: <> ( docautocomplete xrn_check_monomial_proof_wrapper )



### xrn_check_monomial_proof

**Description:**

The **xrn_check_monomial_proof** is used to verify a zero knowledge proof, starting from a binomial key.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_check_monomial_proof (
     xbinomial_key_t binomial_key,
     xrn_matrix_t * xrn_matrix,
     xbinomial_commitment_t binomial_commitment,
     xmonomial_response_t monomial_response,
     xmonomial_proof_t monomial_proof,
     xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **input:** binomial_key $\rightarrow$ The binomial key related to the commitment. \
> **input:** xrn_matrix $\rightarrow$ The decompressed xoron matrix pointer. \
> **input:** binomial_commitment $\rightarrow$ The binomial commitment. \
> **input:** monomial_response $\rightarrow$ The monomial response. \
> **input:** monomial_proof $\rightarrow$ The monomial proof. \
> **inout:** settings $\rightarrow$ The run time settings. 

[comment]: <> ( docautocomplete xrn_check_monomial_proof )



### xrn_check_monomial_proof_from_signature_wrapper

**Description:**

The **xrn_check_monomial_proof_from_signature_wrapper** is used to verify a zero knowledge proof, starting from a signature.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_check_monomial_proof_from_signature_wrapper (
     FILE * plain_text_fpr,
     FILE * xrn_matrix_fpr,
     FILE * signature_fpr,
     FILE * binomial_commitment_fpr,
     FILE * monomial_response_fpr,
     FILE * monomial_proof_fpr,
     xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **input:** plain_text_fpr $\rightarrow$ The signed file. \
> **input:** xrn_matrix_fpr $\rightarrow$ The xoron matrix file pointer. \
> **input:** signature_fpr $\rightarrow$ The signature file pointer. \
> **input:** binomial_commitment_fpr $\rightarrow$ The issuer commitment file pointer. \
> **input:** monomial_response_fpr $\rightarrow$ The verifier response file pointer. \
> **input:** monomial_proof_fpr $\rightarrow$ The monomial proof file pointer. \
> **inout:** settings $\rightarrow$ The run time settings. 


[comment]: <> ( docautocomplete xrn_check_monomial_proof_from_signature_wrapper )



### xrn_check_monomial_proof_from_signature

**Description:**

The **xrn_check_monomial_proof_from_signature** is used to verify a zero knowledge proof, starting from a symmetric signature.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_check_monomial_proof_from_signature (
     FILE * plain_text_fpr,
     xrn_matrix_t * xrn_matrix,
     xsignature_sym_t signature,
     xbinomial_commitment_t binomial_commitment,
     xmonomial_response_t monomial_response,
     xmonomial_proof_t monomial_proof,
     xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **input:** plain_text_fpr $\rightarrow$ The plain text file pointer. \
> **input:** xrn_matrix $\rightarrow$ The decompressed xoron matrix pointer. \
> **input:** signature $\rightarrow$ The symmetric signature. \
> **input:** binomial_commitment $\rightarrow$ The binomial commitment. \
> **input:** monomial_response $\rightarrow$ The monomial response. \
> **input:** monomial_proof $\rightarrow$ The monomial proof. \
> **inout:** settings $\rightarrow$ The run time settings. 

[comment]: <> ( docautocomplete xrn_check_monomial_proof_from_signature )



### xrn_check_monomial_proof_from_signature_bytes_wrapper

**Description:**

The **xrn_check_monomial_proof_from_signature_bytes_wrapper** is used to verify a zero knowledge proof, starting from a signature.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_check_monomial_proof_from_signature_bytes_wrapper (
     uint8_t * in_bytes,
     uint64_t in_length,
     FILE * xrn_matrix_fpr,
     FILE * signature_fpr,
     FILE * binomial_commitment_fpr,
     FILE * monomial_response_fpr,
     FILE * monomial_proof_fpr,
     xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **input:** in_bytes $\rightarrow$ The bytes that need to be signed. \
> **input:** in_length $\rightarrow$ The length of the bytes. \
> **input:** xrn_matrix_fpr $\rightarrow$ The xoron matrix file pointer. \
> **input:** signature_fpr $\rightarrow$ The signature file pointer. \
> **input:** binomial_commitment_fpr $\rightarrow$ The issuer commitment file pointer. \
> **input:** monomial_response_fpr $\rightarrow$ The verifier response file pointer. \
> **input:** monomial_proof_fpr $\rightarrow$ The monomial proof file pointer. \
> **inout:** settings $\rightarrow$ The run time settings. 


[comment]: <> ( docautocomplete xrn_check_monomial_proof_from_signature_bytes_wrapper )



### xrn_check_monomial_proof_from_signature_bytes

**Description:**

The **xrn_check_monomial_proof_from_signature_bytes** is used to verify a zero knowledge proof, starting from a symmetric signature.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_check_monomial_proof_from_signature_bytes (
     uint8_t * in_bytes,
     uint64_t in_length,
     xrn_matrix_t * xrn_matrix,
     xsignature_sym_t signature,
     xbinomial_commitment_t binomial_commitment,
     xmonomial_response_t monomial_response,
     xmonomial_proof_t monomial_proof,
     xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **input:** in_bytes $\rightarrow$ The bytes that need to be signed. \
> **input:** in_length $\rightarrow$ The length of the bytes. \
> **input:** xrn_matrix $\rightarrow$ The decompressed xoron matrix pointer. \
> **input:** signature $\rightarrow$ The symmetric signature. \
> **input:** binomial_commitment $\rightarrow$ The binomial commitment. \
> **input:** monomial_response $\rightarrow$ The monomial response. \
> **input:** monomial_proof $\rightarrow$ The monomial proof. \
> **inout:** settings $\rightarrow$ The run time settings. 

[comment]: <> ( docautocomplete xrn_check_monomial_proof_from_signature_bytes )



### xrn_check_monomial_proof_from_certificate_wrapper

**Description:**

The **xrn_check_monomial_proof_from_certificate_wrapper** is used to verify a zero knowledge proof, starting from a certificate.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_check_monomial_proof_from_certificate_wrapper (
     FILE * certificate_fpr,
     FILE * xrn_matrix_fpr,
     FILE * binomial_commitment_fpr,
     FILE * monomial_response_fpr,
     FILE * monomial_proof_fpr,
     xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **input:** certificate_fpr $\rightarrow$ The signature file pointer. \
> **input:** xrn_matrix_fpr $\rightarrow$ The xoron matrix file pointer. \
> **input:** binomial_commitment_fpr $\rightarrow$ The issuer commitment file pointer. \
> **input:** monomial_response_fpr $\rightarrow$ The verifier response file pointer. \
> **input:** monomial_proof_fpr $\rightarrow$ The monomial proof file pointer. \
> **inout:** settings $\rightarrow$ The run time settings. 

[comment]: <> ( docautocomplete xrn_check_monomial_proof_from_certificate_wrapper )

### xrn_check_monomial_proof_from_certificate

**Description:**

The **xrn_check_monomial_proof_from_certificate** is used to verify a zero knowledge proof, starting from a symmetric certificate.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_check_monomial_proof_from_certificate (
     xcertificate_sym_t certificate,
     xrn_matrix_t * xrn_matrix,
     xbinomial_commitment_t binomial_commitment,
     xmonomial_response_t monomial_response,
     xmonomial_proof_t monomial_proof,
     xrn_crypto_extra_settings_t settings
);
```

**Arguments description:**

> **input:** certificate $\rightarrow$ The symmetric certificate. \
> **input:** xrn_matrix $\rightarrow$ The decompressed xoron matrix pointer. \
> **input:** binomial_commitment $\rightarrow$ The binomial commitment. \
> **input:** monomial_response $\rightarrow$ The monomial response. \
> **input:** monomial_proof $\rightarrow$ The monomial proof. \
> **inout:** settings $\rightarrow$ The run time settings. 

[comment]: <> ( docautocomplete xrn_check_monomial_proof_from_certificate )

## Steganography

### xrn_estimate_steg_block_length

**Description:**

The **xrn_estimate_steg_block_length** is used to estimate the maximum capacity of an envelope file.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_estimate_steg_block_length ( 
     FILE * envelope_fpi,
     uint8_t folding_en,
     uint64_t * capacity
 );
```

**Arguments description:**

> **input:** envelop_fpi $\rightarrow$ The input file pointer to host the information. \
> **input:** folding_en $\rightarrow$ Assume that the source has been encdoded. \
> **output:** capacity $\rightarrow$ The output capacity of the envelope pointer. 

[comment]: <> ( docautocomplete xrn_estimate_steg_block_length )

### xrn_make_steg_block

**Description:**

The **xrn_make_steg_block** is used to generate a block and embed the block in a file.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_make_steg_block ( 
     FILE * source_fpi, 
     FILE * envelop_fpi, 
     FILE * envelop_fpo, 
     uint8_t folding_en,
     uint32_t tag,
     uint64_t offset,
     uint64_t length,
     xrn_crypto_extra_settings_t settings
 );
```

**Arguments description:**

> **input:** source_fpi $\rightarrow$ The source file pointer to partially write in a block. \
> **input:** envelop_fpi $\rightarrow$ The input file pointer of an envelop file (the file to do the steganography). \
> **output:** envelop_fpo $\rightarrow$ The output file pointer with the information of the encoded file, that looks like the envelop.
> **input:** folding_en $\rightarrow$ Assume that the source_fi file has been encdoded. \
> **input:** tag $\rightarrow$ The tag associated to the encoded file. \
> **input:** offset $\rightarrow$ The offset of the block. \
> **input:** length $\rightarrow$ The length of the block. \
> **inout:** settings $\rightarrow$ The run time settings pointer. 

[comment]: <> ( docautocomplete xrn_make_steg_block )

### xrn_make_steg_raw

**Description:**

The **xrn_make_steg_raw** is used to embed the source file in an envelop.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_make_steg_raw ( 
     FILE * source_fpi, 
     FILE * envelop_fpi, 
     FILE * envelop_fpo
 );
```

**Arguments description:**

> **input:** source_fpi $\rightarrow$ The source file pointer to write in an envelop. \
> **input:** envelop_fpi $\rightarrow$ The input file pointer of an envelop file (the file to do the steganography). \
> **output:** envelop_fpo $\rightarrow$ The output file pointer with the information of the encoded file, that looks like the envelop.

[comment]: <> ( docautocomplete xrn_make_steg_raw )


### xrn_estimate_steg_block_length_bytes

**Description:**

The **xrn_estimate_steg_block_length_bytes** is used to estimate the maximum capacity of envelope byte stream.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_estimate_steg_block_length_bytes ( 
     uint64_t envelope_length,
     uint8_t folding_en,
     uint64_t * capacity
 );
```

**Arguments description:**

> **input:** envelope_length $\rightarrow$ The length of the input byte stream. \
> **input:** folding_en $\rightarrow$ Assume that the source has been encdoded. \
> **output:** capacity $\rightarrow$ The output capacity of the envelope pointer. 

[comment]: <> ( docautocomplete xrn_estimate_steg_block_length_bytes )

### xrn_make_steg_block_bytes

**Description:**

The **xrn_make_steg_block_bytes** is used to generate a block and embed the block in a stream of bytes.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_make_steg_block_bytes ( 
     uint8_t * source_bytes, 
     uint64_t encoded_length, 
     uint8_t * in_envelop_bytes, 
     uint64_t in_envelop_length, 
     uint8_t * out_envelop_bytes, 
     uint64_t out_envelop_length, 
     uint8_t folding_en,
     uint32_t tag,
     uint64_t offset,
     uint64_t length,
     xrn_crypto_extra_settings_t settings
 );
```

**Arguments description:**

> **input:** source_bytes $\rightarrow$ The input byte stream pointer to partially write in a block. \
> **input:** encoded_length $\rightarrow$ The length of the encoded stream. \
> **input:** in_envelop_bytes $\rightarrow$ The input envelop byte stream pointer. \
> **input:** in_envelop_length $\rightarrow$ The length of the input envelop stream. \
> **output:** out_envelop_bytes $\rightarrow$ The output envelop byte stream pointer. \
> **input:** out_envelop_length $\rightarrow$ The length of the output envelop stream. \
> **input:** folding_en $\rightarrow$ Assume that the source_bytes stream pointer is encdoded. \
> **input:** tag $\rightarrow$ The tag associated to the encoded file. \
> **input:** offset $\rightarrow$ The offset of the block. \
> **input:** length $\rightarrow$ The length of the block. \
> **inout:** settings $\rightarrow$ The run time settings pointer. 

[comment]: <> ( docautocomplete xrn_make_steg_block_bytes )


### xrn_make_steg_raw_bytes

**Description:**

The **xrn_make_steg_raw_bytes** is used to generate embed the raw source bytes in a stream of bytes.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_make_steg_raw_bytes ( 
     uint8_t * source_bytes, 
     uint64_t encoded_length, 
     uint8_t * in_envelop_bytes, 
     uint64_t in_envelop_length, 
     uint8_t * out_envelop_bytes, 
     uint64_t out_envelop_length
 );
```

**Arguments description:**

> **input:** source_bytes $\rightarrow$ The input byte stream pointer to partially write. \
> **input:** encoded_length $\rightarrow$ The length of the encoded stream. \
> **input:** in_envelop_bytes $\rightarrow$ The input envelop byte stream pointer. \
> **input:** in_envelop_length $\rightarrow$ The length of the input envelop stream. \
> **output:** out_envelop_bytes $\rightarrow$ The output envelop byte stream pointer. \
> **input:** out_envelop_length $\rightarrow$ The length of the output envelop stream. 

[comment]: <> ( docautocomplete xrn_make_steg_raw_bytes )

### xrn_extract_steg_block

**Description:**

The **xrn_extract_steg_block** is used to generate a common block from an embedded steganography block file.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_extract_steg_block( 
     FILE * envelop_fpi, 
     FILE * block_fo, 
     xrn_crypto_extra_settings_t settings
 );
```

**Arguments description:**

> **input:** envelop_fpi $\rightarrow$ The input file pointer of an enveloped block. \
> **input:** block_fo $\rightarrow$ The output block file pointer. \
> **inout:** settings $\rightarrow$ The run time settings pointer. 

[comment]: <> ( docautocomplete xrn_extract_steg_block )



### xrn_extract_steg_raw

**Description:**

The **xrn_extract_steg_raw** is used to generate a raw file from an embedded steganography raw file.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_extract_steg_raw( 
     FILE * envelop_fpi, 
     FILE * raw_fo
 );
```

**Arguments description:**

> **input:** envelop_fpi $\rightarrow$ The input file pointer of an enveloped raw file. \
> **input:** raw_fo $\rightarrow$ The output raw file pointer. 

[comment]: <> ( docautocomplete xrn_extract_steg_raw )


### xrn_extract_steg_block_bytes

**Description:**

The **xrn_extract_steg_block_bytes** is used to generate a common block from an embedded steganography stream of bytes.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_extract_steg_block_bytes( 
     uint8_t * envelop_bytes, 
     uint64_t envelop_length, 
     uint8_t * block_bytes, 
     uint64_t block_length, 
     uint64_t * written_bytes, 
     xrn_crypto_extra_settings_t settings
 );
```

**Arguments description:**

> **input:** envelop_bytes $\rightarrow$ The input byte stream pointer of a steganography stream. \
> **input:** envelop_length $\rightarrow$ The length of the steganography stream. \
> **output:** block_bytes $\rightarrow$ The output byte stream with the block. \
> **input:** block_length $\rightarrow$ The length of the output block byte stream. \
> **output:** written_bytes $\rightarrow$ The written bytes in the output stream. \
> **inout:** settings $\rightarrow$ The run time settings pointer. 

[comment]: <> ( docautocomplete xrn_extract_steg_block_bytes )



### xrn_extract_steg_raw_bytes

**Description:**

The **xrn_extract_steg_raw_bytes** is used to generate a common raw file from an embedded steganography stream of bytes.

**Function declaration:**

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
int xrn_extract_steg_raw_bytes( 
     uint8_t * envelop_bytes, 
     uint64_t envelop_length, 
     uint8_t * raw_bytes, 
     uint64_t raw_length, 
     uint64_t * written_bytes
 );
```

**Arguments description:**

> **input:** envelop_bytes $\rightarrow$ The input byte stream pointer of a steganography stream. \
> **input:** envelop_length $\rightarrow$ The length of the steganography stream. \
> **output:** raw_bytes $\rightarrow$ The output byte stream with the raw content. \
> **input:** raw_length $\rightarrow$ The length of the output raw byte stream. \
> **output:** written_bytes $\rightarrow$ The written bytes in the output stream. 

[comment]: <> ( docautocomplete xrn_extract_steg_raw_bytes )


## End of the library

[comment]: <> (../inc/xrn_crypto.h)
```Xoronos_C
#endif
```

